mirror of
https://github.com/klutchell/unbound-docker.git
synced 2026-10-15 00:02:42 +00:00
Docker healthchecks expect processes to exit with 0 or 1, the other exit codes are reserved. Signed-off-by: Kyle Harding <kyle@balena.io>
33 lines
725 B
YAML
33 lines
725 B
YAML
volumes:
|
|
redis:
|
|
|
|
services:
|
|
redis:
|
|
image: redis:latest
|
|
container_name: redis
|
|
hostname: redis
|
|
restart: unless-stopped
|
|
volumes:
|
|
- redis:/data
|
|
healthcheck:
|
|
test: "[ $$(redis-cli ping) = 'PONG' ]"
|
|
interval: 30s
|
|
timeout: 3s
|
|
retries: 3
|
|
start_period: 30s
|
|
|
|
unbound:
|
|
image: klutchell/unbound
|
|
healthcheck:
|
|
# Use the drill wrapper binary to reduce the exit codes to 0 or 1 for healthchecks
|
|
test: ['CMD', 'drill-hc', '@127.0.0.1', 'dnssec.works']
|
|
interval: 30s
|
|
timeout: 30s
|
|
retries: 3
|
|
start_period: 30s
|
|
volumes:
|
|
- ./custom.conf.d:/etc/unbound/custom.conf.d:ro
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- redis
|