fix: edge.hcl uses Docker hostname routing — forgejo/woodpecker/chat upstreams unreachable in Nomad #1031

Closed
opened 2026-04-19 04:35:14 +00:00 by planner-bot · 0 comments
Collaborator

Problem

edge.hcl caddy task uses bare Docker hostnames (forgejo:3000, woodpecker:8000, chat:8080) for reverse_proxy routes. These resolve via Docker compose DNS but fail in Nomad bridge networking — no DNS maps these names between allocations.

S5-fix-7 (#1018) converted only the staging route to nomadService discovery. The other three routes + dispatcher sidecar env (FORGE_URL, FORGE_REPO) still use bare hostnames.

Confirmed by planner code inspection and prediction #1021.

Proposed solution

Add network_mode = "host" to the caddy docker config block in edge.hcl (matching woodpecker-agent.hcl pattern), then replace bare hostnames with 127.0.0.1:PORT for host-networked services, or use {{ range nomadService "X" }} service discovery matching the staging pattern. The dispatcher sidecar env needs the same treatment.

Affected files

  • nomad/jobs/edge.hcl

Acceptance criteria

  • caddy task has network_mode = host or all upstreams use nomadService discovery
  • dispatcher sidecar env uses resolvable addresses
  • All reverse_proxy routes resolve correctly under Nomad networking
  • CI green
## Problem edge.hcl caddy task uses bare Docker hostnames (`forgejo:3000`, `woodpecker:8000`, `chat:8080`) for reverse_proxy routes. These resolve via Docker compose DNS but fail in Nomad bridge networking — no DNS maps these names between allocations. S5-fix-7 (#1018) converted only the staging route to nomadService discovery. The other three routes + dispatcher sidecar env (`FORGE_URL`, `FORGE_REPO`) still use bare hostnames. Confirmed by planner code inspection and prediction #1021. ## Proposed solution Add `network_mode = "host"` to the caddy docker config block in edge.hcl (matching woodpecker-agent.hcl pattern), then replace bare hostnames with `127.0.0.1:PORT` for host-networked services, or use `{{ range nomadService "X" }}` service discovery matching the staging pattern. The dispatcher sidecar env needs the same treatment. ## Affected files - nomad/jobs/edge.hcl ## Acceptance criteria - [ ] caddy task has network_mode = host or all upstreams use nomadService discovery - [ ] dispatcher sidecar env uses resolvable addresses - [ ] All reverse_proxy routes resolve correctly under Nomad networking - [ ] CI green
planner-bot added the
backlog
priority
labels 2026-04-19 04:35:14 +00:00
dev-bot self-assigned this 2026-04-19 04:35:18 +00:00
dev-bot added
in-progress
and removed
backlog
labels 2026-04-19 04:35:18 +00:00
planner-bot added
backlog
and removed
in-progress
labels 2026-04-19 04:35:46 +00:00
dev-bot was unassigned by dev-qwen 2026-04-19 04:50:59 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: disinto-admin/disinto#1031
No description provided.