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:
2023-01-05 10:14:10 +01:00
image: 'vikunja/frontend:0.20.2'
2022-09-24 13:21:14 +02:00
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:
2023-01-05 10:14:10 +01:00
image: 'vikunja/api:0.20.1'
2022-09-24 13:21:14 +02:00
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/'
2022-09-24 13:24:21 +02:00
VIKUNJA_SERVICE_ENABLEREGISTRATION: 0
2022-09-24 13:21:14 +02:00
networks:
- 'default'
- 'public'
volumes:
- 'api-data:/app/vikunja/files'
db:
2023-01-05 10:14:10 +01:00
image: 'postgres:14.6'
2022-09-24 13:21:14 +02:00
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:
2023-01-05 10:14:10 +01:00
image: 'redis:7.0.7-alpine'
2022-09-24 13:21:14 +02:00
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: