| 1 | amends "../../config/Service.pkl" |
| 2 | |
| 3 | import "../../config/site.pkl" as site |
| 4 | |
| 5 | meta { name = "DDNS" } |
| 6 | enabled = !site.preview && !site.domain.endsWith(".test") |
| 7 | |
| 8 | requiredSecrets { "cloudflare_zone_id"; "cloudflare_api_token" } |
| 9 | |
| 10 | container { |
| 11 | image = "docker.io/qmcgaw/ddns-updater@sha256:68f3ea596a66e09d137c997d818d8ad50f780eaa73b4e8a6263f680318070da9" |
| 12 | cpu = 100 |
| 13 | memory = 128 |
| 14 | |
| 15 | http { |
| 16 | containerPort = 8000 |
| 17 | subdomain = "ddns" |
| 18 | authRole = "infra-admin" |
| 19 | } |
| 20 | |
| 21 | volumes { ["/updater/data"] {} } |
| 22 | |
| 23 | env { |
| 24 | ["PERIOD"] = "5m" |
| 25 | ["CONFIG"] = "{\"settings\":[{\"provider\":\"cloudflare\",\"zone_identifier\":\"${secret.own.cloudflare_zone_id}\",\"domain\":\"*.\(site.domain)\",\"ttl\":1,\"proxied\":false,\"ip_version\":\"ipv4\",\"token\":\"${secret.own.cloudflare_api_token}\"}]}" |
| 26 | } |
| 27 | } |