Skip to content

Commit f73679b

Browse files
committed
[Sync] Fix OctoBot healthcheck
Signed-off-by: Herklos <herklos@drakkar.software>
1 parent 3931bad commit f73679b

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

infra/sync/ansible/roles/stack/templates/docker-compose.yml.j2

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ services:
2929
mem_limit: 1g
3030
security_opt:
3131
- no-new-privileges:true
32+
healthcheck:
33+
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:{{ octobot_sync_port }}/health')"]
34+
interval: 10s
35+
timeout: 5s
36+
retries: 5
37+
start_period: 30s
3238
depends_on:
3339
- garage
3440
networks:
@@ -42,7 +48,8 @@ services:
4248
volumes:
4349
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
4450
depends_on:
45-
- octobot-sync
51+
octobot-sync:
52+
condition: service_healthy
4653
restart: unless-stopped
4754
mem_limit: 256m
4855
security_opt:

0 commit comments

Comments
 (0)