services: karldns: build: . restart: unless-stopped env_file: - .env environment: DDNS_DATABASE: ${DDNS_DATABASE:-/data/ddns.sqlite3} ports: - "8080:8080" volumes: - karldns-data:/data # Keep the default single-worker command unless multi-worker rate limiting has been tested. healthcheck: test: ["CMD", "python", "-c", "import os, urllib.parse, urllib.request; host=urllib.parse.urlparse(os.environ['DDNS_PUBLIC_BASE_URL']).hostname; req=urllib.request.Request('http://127.0.0.1:8080/healthz', headers={'Host': host}); urllib.request.urlopen(req, timeout=2).read()"] interval: 30s timeout: 5s retries: 3 volumes: karldns-data: