Skip to content

Commit

Permalink
Check postgres availability through network port
Browse files Browse the repository at this point in the history
The pg_isready returns true earlier if tested through the local socket.
I have added the '-h postgres' flag, to test availability throught the
network port.
  • Loading branch information
jhelfferich committed Oct 21, 2024
1 parent 906153d commit 51cc7a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
POSTGRES_USER: &pguser odoo
POSTGRES_PASSWORD: &pgpassword odoo
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
test: ["CMD-SHELL", "pg_isready -h postgres"]
interval: 5s
timeout: 5s
retries: 5
Expand Down

0 comments on commit 51cc7a4

Please sign in to comment.