Skip to content

Commit ee7ede9

Browse files
authored
Merge pull request #5 from C4T-BuT-S4D/pomo/ark-db-healthcheck
Add ark service healthcheck
2 parents baa55cb + 9151d43 commit ee7ede9

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

services/ark/docker-compose.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@ services:
1010
volumes:
1111
- postgres_data:/var/lib/postgresql/data
1212
command: postgres -c max_connections=1000
13+
healthcheck:
14+
test: pg_isready -U postgres -d ark
15+
interval: 10s
16+
timeout: 5s
17+
retries: 5
18+
start_period: 30s
1319

1420
app:
1521
build: .
1622
restart: unless-stopped
17-
depends_on:
18-
- db
1923
environment:
2024
DATABASE_URL: postgres://postgres:postgres@db:5432/ark
2125
ports:
@@ -39,6 +43,9 @@ services:
3943
net.ipv4.tcp_keepalive_probes: 5
4044
cpus: 2
4145
mem_limit: 2048M
46+
depends_on:
47+
db:
48+
condition: service_healthy
4249

4350
volumes:
4451
postgres_data:

0 commit comments

Comments
 (0)