Added vikunja stack

master
Jef Roosens 2022-09-24 13:21:14 +02:00
parent a435b901b4
commit f8900106d5
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
1 changed files with 98 additions and 0 deletions

98
stacks/vikunja.yml 100644
View File

@ -0,0 +1,98 @@
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:
'node.labels.class.vikunja==true'
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: