fix: vikunja

This commit is contained in:
Andras Bacsai 2024-07-15 12:51:04 +02:00
parent 0089e86dd1
commit 674fa4d09c
3 changed files with 27 additions and 28 deletions

View File

@ -5,19 +5,6 @@
# port: 3456 # port: 3456
services: services:
postgresql:
image: postgres:16-alpine
volumes:
- vikunja-postgresql-data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=${SERVICE_USER_POSTGRESQL}
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRESQL}
- POSTGRES_DB=${POSTGRESQL_DATABASE}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
timeout: 20s
retries: 10
vikunja: vikunja:
image: vikunja/vikunja image: vikunja/vikunja
environment: environment:
@ -35,8 +22,16 @@ services:
depends_on: depends_on:
postgresql: postgresql:
condition: service_healthy condition: service_healthy
postgresql:
image: postgres:16-alpine
volumes:
- vikunja-postgresql-data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=${SERVICE_USER_POSTGRESQL}
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRESQL}
- POSTGRES_DB=${POSTGRESQL_DATABASE}
healthcheck: healthcheck:
test: ["CMD", "wget", "--spider", "http://127.0.0.1:3456"] test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s interval: 5s
timeout: 20s timeout: 20s
retries: 10 retries: 10

View File

@ -13,11 +13,15 @@ services:
- VIKUNJA_SERVICE_JWTSECRET=$SERVICE_PASSWORD_JWTSECRET - VIKUNJA_SERVICE_JWTSECRET=$SERVICE_PASSWORD_JWTSECRET
- VIKUNJA_SERVICE_ENABLEREGISTRATION=true - VIKUNJA_SERVICE_ENABLEREGISTRATION=true
- VIKUNJA_DATABASE_PATH=/db/vikunja.db - VIKUNJA_DATABASE_PATH=/db/vikunja.db
- VIKUNJA_DATABASE_TYPE=sqlite
volumes: volumes:
- vikunja-data:/app/vikunja/ - vikunja-data:/app/vikunja/
- vikunja-sqlite-data:/db - vikunja-sqlite-data:/db
healthcheck: depends_on:
test: ["CMD", "wget", "--spider", "http://127.0.0.1:3456"] - init
interval: 5s init:
timeout: 20s image: busybox
retries: 10 restart: no
volumes:
- vikunja-sqlite-data:/db
command: ["sh", "-c", "touch /db/vikunja.db && chown -R 1000 /db"]

File diff suppressed because one or more lines are too long