Fix database migrations - run from app container instead of volume mount

- Removed migrations volume mount from docker-compose.yml
- Added automatic migration runner in server.js on startup
- Migrations now run from files built into Docker image
- Fixes 'relation does not exist' errors
This commit is contained in:
Mikael Westöö
2026-01-23 22:12:16 +01:00
parent a44f8e18d7
commit 8653b00921
2 changed files with 30 additions and 4 deletions

View File

@@ -11,7 +11,6 @@ services:
POSTGRES_PASSWORD: ${DB_PASSWORD:-changeme123}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./migrations:/docker-entrypoint-initdb.d
ports:
- "5432:5432"
healthcheck: