From 39a9cd0d5124b698c5b0b47d3dcab2f2aceee5f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Malfait?= Date: Mon, 2 Dec 2024 09:58:03 +0100 Subject: [PATCH] Fix Make Postgres on Docker (#8830) Fixes #8630 --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ee4fb9ce59ff..851203d1a8fd 100644 --- a/Makefile +++ b/Makefile @@ -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;"