Merge pull request #402 from catumin/docker-compose
Some checks failed
Docker Image CI / build (push) Has been cancelled

Wait for Postgres healthcheck before attempting to continue
This commit is contained in:
2025-06-16 09:52:11 +02:00
committed by GitHub
2 changed files with 18 additions and 4 deletions

View File

@ -11,7 +11,8 @@ services:
ports:
- "6531:6531"
depends_on:
- tranga-pg
tranga-pg:
condition: service_healthy
environment:
- POSTGRES_HOST=tranga-pg
restart: unless-stopped
@ -22,4 +23,10 @@ services:
- "5432:5432"
environment:
- POSTGRES_PASSWORD=postgres
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
restart: unless-stopped

View File

@ -1,4 +1,4 @@
version: '3'
version: '3'
services:
tranga-api:
image: glax/tranga-api:latest
@ -9,7 +9,8 @@ services:
ports:
- "6531:6531"
depends_on:
- tranga-pg
tranga-pg:
condition: service_healthy
environment:
- POSTGRES_HOST=tranga-pg
restart: unless-stopped
@ -28,4 +29,10 @@ services:
- "5432:5432"
environment:
- POSTGRES_PASSWORD=postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
restart: unless-stopped