You've already forked netbox
added healthchecks
This commit is contained in:
@@ -51,6 +51,11 @@ services:
|
||||
- SUPERUSER_NAME=${NETBOX_SUPERUSER_NAME}
|
||||
- SUPERUSER_PASSWORD=${NETBOX_SUPERUSER_PASS}
|
||||
- WEBHOOKS_ENABLED=${NETBOX_WEBHOOKS}
|
||||
healthcheck:
|
||||
test: curl -f http://localhost:8080/login/ || exit 1
|
||||
start_period: 90s
|
||||
timeout: 3s
|
||||
interval: 15s
|
||||
labels:
|
||||
- traefik.enable=${TRAEFIK_ENABLED}
|
||||
- traefik.docker.network=${TRAEFIK_NETWORK}
|
||||
@@ -96,6 +101,11 @@ services:
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
healthcheck:
|
||||
test: ps -aux | grep -v grep | grep -q rqworker || exit 1
|
||||
start_period: 20s
|
||||
timeout: 3s
|
||||
interval: 15s
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
networks:
|
||||
@@ -120,6 +130,12 @@ services:
|
||||
- POSTGRES_DB=${PSQL_NAME}
|
||||
- POSTGRES_USER=${PSQL_USER}
|
||||
- POSTGRES_PASSWORD=${PSQL_PASS}
|
||||
healthcheck:
|
||||
test: pg_isready -q -t 2 -d $$POSTGRES_DB -U $$POSTGRES_USER
|
||||
start_period: 20s
|
||||
timeout: 30s
|
||||
interval: 10s
|
||||
retries: 5
|
||||
labels:
|
||||
### Section DIUN
|
||||
- diun.enable=${DIUN_POSTGRES_ENABLE}
|
||||
@@ -141,6 +157,12 @@ services:
|
||||
- redis-server --appendonly yes --requirepass $$REDIS_PASSWORD
|
||||
environment:
|
||||
- REDIS_PASSWORD=${REDIS_PASS}
|
||||
healthcheck: &redis-healthcheck
|
||||
test: '[ $$(redis-cli --pass "$${REDIS_PASSWORD}" ping) = ''PONG'' ]'
|
||||
start_period: 5s
|
||||
timeout: 3s
|
||||
interval: 1s
|
||||
retries: 5
|
||||
labels:
|
||||
### Section DIUN
|
||||
- diun.enable=${DIUN_REDIS_ENABLE}
|
||||
@@ -161,6 +183,7 @@ services:
|
||||
- redis-server --requirepass $$REDIS_PASSWORD
|
||||
environment:
|
||||
- REDIS_PASSWORD=${REDIS_CACHE_PASS}
|
||||
healthcheck: *redis-healthcheck
|
||||
networks:
|
||||
- internal
|
||||
|
||||
|
||||
Reference in New Issue
Block a user