fix: [nomad-step-5] edge caddy task fails to clone Forgejo from 127.0.0.1:3000 under bridge network (#1034) #1039

Merged
dev-qwen2 merged 2 commits from fix/issue-1034 into main 2026-04-19 09:56:50 +00:00
Showing only changes of commit ada27759de - Show all commits

View file

@ -225,6 +225,21 @@ EOT
read_only = false read_only = false
} }
# Forge URL via Nomad service discovery (issue #1034)
# Resolves forgejo service address/port dynamically for bridge network
# compatibility. Template-scoped to dispatcher task (Nomad doesn't
# propagate templates across tasks).
template {
destination = "local/forge.env"
env = true
change_mode = "restart"
data = <<EOT
{{ range service "forgejo" -}}
FORGE_URL=http://{{ .Address }}:{{ .Port }}
{{- end }}
EOT
}
# Vault-templated secrets (S5.1, issue #988) # Vault-templated secrets (S5.1, issue #988)
# Renders FORGE_TOKEN from Vault KV v2 for ops repo access. # Renders FORGE_TOKEN from Vault KV v2 for ops repo access.
template { template {