fix: use DDNS_URL env var for availability check; default to port 8080
Unit Tests / test (push) Successful in 15m23s

_check_pic_ngo_available was hardcoding https://ddns.pic.ngo, ignoring
DDNS_URL. Now imports DDNS_API_BASE from setup_manager so both the
availability check and DDNS registration use the same configured URL.

API container now receives DDNS_URL and DDNS_TOTP_SECRET from env.
Default DDNS_URL points to http://ddns.pic.ngo:8080/api/v1 (the
FastAPI service runs on port 8080 without TLS termination in front).

Also returns 503 (not 500) when the DDNS service is unreachable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-26 13:06:44 -04:00
parent 55d36eb410
commit 777ffa4fb2
2 changed files with 13 additions and 5 deletions
+3
View File
@@ -204,6 +204,9 @@ services:
profiles: ["core", "full"]
ports:
- "127.0.0.1:${API_PORT:-3000}:3000"
environment:
- DDNS_URL=${DDNS_URL:-http://ddns.pic.ngo:8080/api/v1}
- DDNS_TOTP_SECRET=${DDNS_TOTP_SECRET:-}
volumes:
- ./data/api:/app/data
- ./data/dns:/app/data/dns