fix: run db migrations on startup in production
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-12-15 16:05:53 +01:00
parent aa5f2328f7
commit cd7707a725
4 changed files with 10 additions and 8 deletions
+3 -2
View File
@@ -10,7 +10,7 @@ services:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- /mnt/DockerMount/task-manager/data:/var/lib/postgresql/data
- /mnt/DockerMount/taskmanager/data:/var/lib/postgresql/data
ports:
- "${POSTGRES_PORT:-5432}:5432"
healthcheck:
@@ -30,7 +30,8 @@ services:
PORT: 5000
SESSION_SECRET: ${SESSION_SECRET}
depends_on:
- postgres
postgres:
condition: service_healthy
healthcheck:
test: [ "CMD", "node", "-e", "require('http').get('http://localhost:5000/api/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})" ]
interval: 30s