File tree Expand file tree Collapse file tree 1 file changed +21
-7
lines changed Expand file tree Collapse file tree 1 file changed +21
-7
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,13 @@ services:
66 - postgres
77 - redis
88 - redis-cache
9- - netbox-worker
109 env_file : env/netbox.env
1110 user : ' unit:root'
11+ healthcheck :
12+ start_period : 60s
13+ timeout : 3s
14+ interval : 15s
15+ test : " curl -f http://localhost:8080/api/ || exit 1"
1216 volumes :
1317 - ./configuration:/etc/netbox/config:z,ro
1418 - ./reports:/etc/netbox/reports:z,ro
@@ -17,19 +21,29 @@ services:
1721 netbox-worker :
1822 << : *netbox
1923 depends_on :
20- - redis
21- - postgres
24+ netbox :
25+ condition : service_healthy
2226 command :
2327 - /opt/netbox/venv/bin/python
2428 - /opt/netbox/netbox/manage.py
2529 - rqworker
30+ healthcheck :
31+ start_period : 20s
32+ timeout : 3s
33+ interval : 15s
34+ test : " ps -aux | grep -v grep | grep -q rqworker || exit 1"
2635 netbox-housekeeping :
2736 << : *netbox
2837 depends_on :
29- - redis
30- - postgres
38+ netbox :
39+ condition : service_healthy
3140 command :
3241 - /opt/netbox/housekeeping.sh
42+ healthcheck :
43+ start_period : 20s
44+ timeout : 3s
45+ interval : 15s
46+ test : " ps -aux | grep -v grep | grep -q housekeeping || exit 1"
3347
3448 # postgres
3549 postgres :
@@ -56,7 +70,7 @@ services:
5670 - redis-server --requirepass $$REDIS_PASSWORD # # $$ because of docker-compose
5771 env_file : env/redis-cache.env
5872 volumes :
59- - netbox-redis-cache-data:/data
73+ - netbox-redis-cache-data:/data
6074
6175volumes :
6276 netbox-media-files :
@@ -66,4 +80,4 @@ volumes:
6680 netbox-redis-data :
6781 driver : local
6882 netbox-redis-cache-data :
69- driver : local
83+ driver : local
You can’t perform that action at this time.
0 commit comments