Traefik: move upstream address into a per-file $ip variable #23
Loading…
Reference in a new issue
No description provided.
Delete branch "audit-repo-rules-templates"
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?
What changed
.openso/rules/30-traefik.md: the rule now says an operator-filled upstream is a single{{ $ip := "<NAME_IP>" }}line in theVARIABLESsection. Server URLs reference{{ $ip }}and keep their own scheme and port. Several servers in one file share$ip. A file with only a blackhole or environment target does not declare$ip.Traefik/appdata/config/conf.d/*.yaml.template(all app templates,traefik-wildcard-cert.yaml): add the$ipvariable line with anUpstream addresscomment, and replace the hard-coded<NAME_IP>placeholders inurl:with{{ $ip }}. Comments on router and service lines are reworded to describe what the line does instead of "Adjust the ...".rustdeskandseafileuse one$ipfor all their services.mailcow,openccu, andtruenasnow set an explicit port (:80/:443) because the old URLs had none, and$iprequires one.Traefik/README.md: the maintenance hint points to the$ipline.Authentik,Traefik, andapp_templatecompose files: thex-required-servicescomment now says "Template directory names merged once by run.sh" instead of "Templates auto-merged by run.sh (recursive)".Why
The placeholder was repeated in every server URL, so an operator had to edit several lines per file and could easily miss one. A single
$ipvariable keeps the address in one place next to$sub, and it follows the same pattern as the subdomain label. The rule file now describes that shape, so the templates and the documented convention match.Notes for reviewers
$ipthe same way the old placeholder was filled.mailcow,openccu, andtruenasstill reach the intended port. Their previous URLs had no explicit port, so the new:80and:443values match the implicit defaults forhttpandhttps.