We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent baaea03 commit e1a9493Copy full SHA for e1a9493
docker-compose.yml
@@ -16,7 +16,8 @@ services:
16
hostname: webapi1
17
container_name: webapi-1
18
depends_on:
19
- - db
+ db:
20
+ condition: service_healthy
21
restart: always
22
environment:
23
DATABASE_URL: Host=db;Username=postgres;Password=postgres;Database=rinha;Minimum Pool Size=10;Maximum Pool Size=10;Multiplexing=true;
@@ -47,6 +48,11 @@ services:
47
48
POSTGRES_USER: postgres
49
POSTGRES_PASSWORD: postgres
50
POSTGRES_DB: rinha
51
+ healthcheck:
52
+ test: ["CMD-SHELL", "pg_isready -U postgres"]
53
+ interval: 5s
54
+ timeout: 5s
55
+ retries: 5
56
ports:
57
- "5432:5432"
58
deploy:
0 commit comments