Skip to content

Commit

Permalink
Merge pull request #1 from 40acres/fix-pg-race-condition
Browse files Browse the repository at this point in the history
Add healtcheck to avoid race condition on postgres
  • Loading branch information
amanzag authored Jan 9, 2025
2 parents 034f953 + 4ee962b commit 49cbc74
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions server-backend/dev/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ services:
POSTGRES_USER: "40swap"
POSTGRES_PASSWORD: "40swap"
POSTGRES_DB: "40swap"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U 40swap"]
interval: 10s
timeout: 5s
retries: 5
cloudbeaver:
image: dbeaver/cloudbeaver:22.2.5
container_name: 40swap_cloudbeaver
Expand Down Expand Up @@ -116,8 +121,10 @@ services:
ports:
- 32838:32838
depends_on:
- postgres
- bitcoind
postgres:
condition: service_healthy
bitcoind:
condition: service_started
restart: unless-stopped
environment:
NBXPLORER_NETWORK: regtest
Expand Down

0 comments on commit 49cbc74

Please sign in to comment.