fix(docker): Fix migrate service authentication

Add POSTGRES_PASSWORD environment variable to migrate service
so it can connect to postgres without interactive password prompt.
This commit is contained in:
2026-03-06 15:04:03 +01:00
parent 8a9a8634f8
commit a7fe565a1f

View File

@@ -34,15 +34,17 @@ services:
depends_on:
postgres:
condition: service_healthy
env_file:
- ../.env
environment:
POSTGRES_USER: stripstream
POSTGRES_PASSWORD: stripstream
POSTGRES_DB: stripstream
volumes:
- ./migrations:/migrations:ro
command:
[
"sh",
"-c",
"for f in /migrations/*.sql; do echo \"Applying migration: $f\"; psql -h postgres -U \"$${POSTGRES_USER:-stripstream}\" -d \"$${POSTGRES_DB:-stripstream}\" -f \"$f\" || exit 1; done",
"export PGPASSWORD=$$POSTGRES_PASSWORD; for f in /migrations/*.sql; do echo \"Applying migration: $$f\"; psql -h postgres -U \"$$POSTGRES_USER\" -d \"$$POSTGRES_DB\" -f \"$$f\" || exit 1; done",
]
api: