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:
@@ -34,15 +34,17 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
env_file:
|
environment:
|
||||||
- ../.env
|
POSTGRES_USER: stripstream
|
||||||
|
POSTGRES_PASSWORD: stripstream
|
||||||
|
POSTGRES_DB: stripstream
|
||||||
volumes:
|
volumes:
|
||||||
- ./migrations:/migrations:ro
|
- ./migrations:/migrations:ro
|
||||||
command:
|
command:
|
||||||
[
|
[
|
||||||
"sh",
|
"sh",
|
||||||
"-c",
|
"-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:
|
api:
|
||||||
|
|||||||
Reference in New Issue
Block a user