Skip to content

Commit

Permalink
Fix Make Postgres on Docker (#8830)
Browse files Browse the repository at this point in the history
Fixes #8630
  • Loading branch information
FelixMalfait authored Dec 2, 2024
1 parent 69f052e commit 39a9cd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ postgres-on-docker:
-p 5432:5432 \
twentycrm/twenty-postgres-spilo:latest
@echo "Waiting for PostgreSQL to be ready..."
@until PGPASSWORD=postgres psql -h localhost -p 5432 -U postgres -d postgres \
@until docker exec twenty_pg psql -U postgres -d postgres \
-c 'SELECT pg_is_in_recovery();' 2>/dev/null | grep -q 'f'; do \
sleep 1; \
done
PGPASSWORD=postgres psql -h localhost -p 5432 -U postgres -d postgres \
docker exec twenty_pg psql -U postgres -d postgres \
-c "CREATE DATABASE \"default\" WITH OWNER postgres;" \
-c "CREATE DATABASE \"test\" WITH OWNER postgres;"

Expand Down

0 comments on commit 39a9cd0

Please sign in to comment.