fix(forgejo): use forgejo.localhost ROOT_URL for cross-network resolution #6

Merged
forgejo_admin merged 1 commit from fix/root-url-alias into master 2026-05-17 14:30:00 +00:00

Single hostname that resolves both from browsers (RFC 6761: *.localhost → 127.0.0.1) and from inside docker (DNS alias on internal network). Closes the ACTIONS_RUNTIME_URL mismatch that breaks artifact uploads with ECONNREFUSED.

Single hostname that resolves both from browsers (RFC 6761: *.localhost → 127.0.0.1) and from inside docker (DNS alias on internal network). Closes the ACTIONS_RUNTIME_URL mismatch that breaks artifact uploads with ECONNREFUSED.
forgejo_admin added 1 commit 2026-05-17 14:30:00 +00:00
Forgejo 10 emits ROOT_URL to job containers as ACTIONS_RUNTIME_URL.
With ROOT_URL=http://localhost:3000/, jobs try to connect to localhost
inside their own network namespace — unreachable, artifact uploads
fail with ECONNREFUSED. LOCAL_ROOT_URL doesn't help (Forgejo 10's
actions path always uses AppURL=ROOT_URL). runner.envs override is
clobbered by act_runner's auto-set.

Use forgejo.localhost as the single ROOT_URL hostname:
- Browsers: *.localhost resolves to 127.0.0.1 per RFC 6761 (Chrome,
  Firefox, Safari all honor this). Port 3000 host mapping forwards to
  the forgejo container. No /etc/hosts entry needed.
- Job containers: Docker DNS alias on forgejo-stack_internal resolves
  forgejo.localhost to this container.

Single URL, two working resolution paths. Existing .env files using
http://localhost:3000/ keep working for browsers but break artifact
uploads — bump them to forgejo.localhost to fix.
forgejo_admin merged commit 18dfc4e696 into master 2026-05-17 14:30:00 +00:00
Sign in to join this conversation.
No reviewers
No labels
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: forgejo_admin/forgejo-stack#6
No description provided.