fix: fix: edge.hcl uses Docker hostname routing — forgejo/woodpecker/chat upstreams unreachable in Nomad (#1031) #1032
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
cannot-reproduce
in-progress
in-triage
needs-triage
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
rejected
reproduced
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#1032
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-1031"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #1031
Changes
AI Review
Summary
Fix adds
network_mode = "host"to the caddy task and rewrites all Caddyfile upstreams from Docker hostnames to127.0.0.1:<port>. The Caddyfile changes are complete and correct. One seam is broken.Blocker
critical
nomad/jobs/edge.hcl:235: The dispatcher task'sFORGE_URLwas changed fromhttp://forgejo:3000tohttp://127.0.0.1:3000, but the dispatcher task has nonetwork_mode = "host"in its Docker config (line 107 adds host networking to caddy only; the dispatcher block at lines 191–249 is unchanged). Inside the dispatcher's bridge-mode network namespace,127.0.0.1is the container's own loopback — forgejo on the host is not reachable there. The fix resolves caddy's connectivity but leaves the dispatcher's Forgejo API calls broken by a different means than before (previously: Docker DNS not available in Nomad; now: wrong loopback address).Fix: add
network_mode = "host"to the dispatcher's Docker config block, exactly as caddy has it. The dispatcher has no port-mapping requirements that would conflict with host networking.Confirmed correct
/forge/*(line 141),/ci/*(line 146),/chat/login(line 157),/chat/oauth/callback(line 160),forward_authin/chat/*(line 164),reverse_proxyin/chat/*(line 169).FORGE_URLenv var updated (line 177). Correct, since caddy has host networking.network_mode = "host"is the correct Nomad Docker driver key for host networking.ports = ["http", "https"]alongsidenetwork_mode = "host"is redundant but harmless — Nomad still uses the group-levelnetworkstanza for service registration.Verdict
REQUEST_CHANGES — Dispatcher task's FORGE_URL changed to 127.0.0.1 but task lacks network_mode=host — unreachable from bridge network namespace
Reviewed at
7fd8a0c| AGENTS.mdAI Review: REQUEST_CHANGES — Dispatcher task's FORGE_URL changed to 127.0.0.1 but task lacks network_mode=host — unreachable from bridge network namespace
AI Re-review (round 2)
Previous Findings\n- Dispatcher task's
FORGE_URLchanged to127.0.0.1:3000but nonetwork_mode = "host"in dispatcher config → FIXED:network_mode = "host"added atnomad/jobs/edge.hcl:198, exactly matching the caddy task's config.\n\n### Verdict\nAll six Caddyfile upstreams correct, caddy task host-networked, dispatcher task host-networked,FORGE_URLconsistent in both tasks. Merge ready.Verdict
APPROVE — Dispatcher task now has network_mode=host — prior blocker closed, no collateral damage
Reviewed at
47046ea| Previous:7fd8a0c| AGENTS.mdAI Re-review (round 2): APPROVE — Dispatcher task now has network_mode=host — prior blocker closed, no collateral damage