mirror of
https://github.com/C9Glax/tranga.git
synced 2025-06-23 03:24:15 +02:00
Wait for Postgres healthcheck before attempting to continue
Signed-off-by: Cat Aulucya <cat@aulucya.gay>
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user