Skip to content

Commit

Permalink
Adds missing steps to apply schema for custom postgres image
Browse files Browse the repository at this point in the history
  • Loading branch information
SonOfLope committed Sep 19, 2024
1 parent dcb8928 commit 91bccd1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dockerfiles/postgres/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@

python3 /app/fetch_schema.py

exec docker-entrypoint.sh "$@"
pg_ctl -D "/var/lib/postgresql/data" -o "-c listen_addresses=''" -w start

psql -U "$POSTGRES_USER" -d "$POSTGRES_DB" -f /app/schema.sql

pg_ctl -D "/var/lib/postgresql/data" -m fast -w stop

exec docker-entrypoint.sh "$@"

0 comments on commit 91bccd1

Please sign in to comment.