Skip to content

Commit

Permalink
Fix database initialization
Browse files Browse the repository at this point in the history
The PG environment variable can't be set to the database container
  • Loading branch information
sbrunner committed Sep 22, 2023
1 parent 4267f5f commit 9d08557
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,6 @@ services:
db:
image: camptocamp/postgres:${POSTGRES_TAG}
environment:
- PGUSER
- PGPASSWORD
- PGDATABASE
- POSTGRES_PASSWORD=${PGPASSWORD}
- POSTGRES_DB=${PGDATABASE}
- POSTGRES_USER=${PGUSER}
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def main() -> None:
"docker-compose",
"exec",
"-T",
"db",
"tools",
"bash",
"-c",
'pg_dump --format=c --dbname="$PGDATABASE"',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def main() -> None:
+ [
"exec",
"-T",
"db",
"tools",
"bash",
"-c",
'pg_restore --dbname="$PGDATABASE" ' + " ".join(args.arg),
Expand Down

0 comments on commit 9d08557

Please sign in to comment.