feat: dynamic DNS updater sidecar (auto-updates A + AAAA every 5min)
- update-dns.sh: detects public IPv4/IPv6, upserts CF records - Runs on container start + every 5 minutes - Only updates if IP actually changed (skips if unchanged) - python:3-alpine container with curl Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -82,6 +82,18 @@ services:
|
||||
networks:
|
||||
- backend
|
||||
|
||||
# ─── Dynamic DNS updater (keeps A + AAAA current) ───
|
||||
dns-updater:
|
||||
image: python:3-alpine
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./update-dns.sh:/update-dns.sh:ro
|
||||
secrets:
|
||||
- cf_api_token
|
||||
entrypoint: ["/bin/sh", "/update-dns.sh"]
|
||||
environment:
|
||||
DNS_UPDATE_INTERVAL: "300" # 5 minutes
|
||||
|
||||
secrets:
|
||||
cf_api_token:
|
||||
file: ./cf_api_token.txt
|
||||
|
||||
Reference in New Issue
Block a user