services: coredns: image: ${COREDNS_IMAGE} container_name: coredns restart: unless-stopped command: ["-conf", "/etc/coredns/Corefile"] ports: - "${DNS_PORT}:53/udp" - "${DNS_PORT}:53/tcp" - "${METRICS_PORT}:9153/tcp" - "${HEALTH_PORT}:8080/tcp" volumes: - ./Corefile:/etc/coredns/Corefile:ro - ./zones-prepared:/zones:ro healthcheck: test: ["CMD", "wget", "-qO-", "http://127.0.0.1:8080/health"] interval: 30s timeout: 5s retries: 3 start_period: 10s