deployment/stacks/vikunja.yml

99 lines
2.4 KiB
YAML
Raw Normal View History

2022-09-24 13:21:14 +02:00
version: '3.4'
services:
frontend:
image: 'vikunja/frontend:0.19.1'
deploy:
# Frontend just serves some static files
mode: 'global'
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.vikunja-frontend.rule=Host(`todo.rustybever.be`)'
- 'traefik.http.routers.vikunja-frontend.tls=true'
- 'traefik.http.routers.vikunja-frontend.tls.certresolver=letsEncrypt'
- 'traefik.http.services.vikunja-frontend.loadbalancer.server.port=80'
environment:
VIKUNJA_API_URL: 'https://todo.rustybever.be/api/v1'
networks:
- 'public'
api:
image: 'vikunja/api:0.19.2'
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints:
2022-09-24 13:22:55 +02:00
- 'node.labels.class.vikunja==true'
2022-09-24 13:21:14 +02:00
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.vikunja-api.rule=Host(`todo.rustybever.be`) && PathPrefix(`/api/`, `/dav/`, `/\.well-known/`)'
- 'traefik.http.routers.vikunja-api.tls=true'
- 'traefik.http.routers.vikunja-api.tls.certresolver=letsEncrypt'
- 'traefik.http.services.vikunja-api.loadbalancer.server.port=3456'
environment:
# Database
VIKUNJA_DATABASE_HOST: 'db'
VIKUNJA_DATABASE_TYPE: 'postgres'
VIKUNJA_DATABASE_USER: 'vikunja'
VIKUNJA_DATABASE_PASSWORD: 'vikunja'
# Redis cache
VIKUNJA_REDIS_ENABLED: 1
VIKUNJA_REDIS_HOST: 'redis:6379'
VIKUNJA_CACHE_ENABLED: 1
VIKUNJA_CACHE_TYPE: redis
VIKUNJA_SERVICE_JWTSECRET:
VIKUNJA_SERVICE_FRONTENDURL: 'https://todo.rustybever.be/'
VIKUNJA_SERVICE_ENABLEREGISTRATION: false
networks:
- 'default'
- 'public'
volumes:
- 'api-data:/app/vikunja/files'
db:
image: 'postgres:14.5'
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints:
- 'node.labels.class.vikunja==true'
environment:
POSTGRES_USER: 'vikunja'
POSTGRES_PASSWORD: 'vikunja'
volumes:
- 'db-data:/var/lib/postgresql/data'
redis:
image: 'redis:7.0.5-alpine'
healthcheck:
test: 'redis-cli -h localhost ping'
interval: '10s'
timeout: '5s'
retries: 3
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints:
- 'node.labels.class.vikunja==true'
networks:
public:
external: true
volumes:
api-data:
db-data: