Skip to content

Commit e1a9493

Browse files
committed
Update docker-compose.yml
1 parent baaea03 commit e1a9493

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docker-compose.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ services:
1616
hostname: webapi1
1717
container_name: webapi-1
1818
depends_on:
19-
- db
19+
db:
20+
condition: service_healthy
2021
restart: always
2122
environment:
2223
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:
4748
POSTGRES_USER: postgres
4849
POSTGRES_PASSWORD: postgres
4950
POSTGRES_DB: rinha
51+
healthcheck:
52+
test: ["CMD-SHELL", "pg_isready -U postgres"]
53+
interval: 5s
54+
timeout: 5s
55+
retries: 5
5056
ports:
5157
- "5432:5432"
5258
deploy:

0 commit comments

Comments
 (0)