From 051989b710356509c80d8dee13d627161e9da68a Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Wed, 9 Mar 2022 18:54:14 -0800 Subject: traefik: make the rules as specific as possible Otherwise, `git` will conflict, since it exists on both domains. --- hosts/common/server/traefik.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hosts/common/server/traefik.nix b/hosts/common/server/traefik.nix index 9882871..0a3d089 100644 --- a/hosts/common/server/traefik.nix +++ b/hosts/common/server/traefik.nix @@ -6,12 +6,14 @@ let domainPublic = "fcuny.net"; domainPrivate = "fcuny.xyz"; mkServiceConfig = name: url: domain: certResolver: { - http.routers."${name}" = { + http.routers."${name}.${domain}" = { rule = "Host(`${name}.${domain}`)"; service = "${name}"; tls.certResolver = certResolver; }; - http.services."${name}" = { loadBalancer.servers = [{ url = url; }]; }; + http.services."${name}.${domain}" = { + loadBalancer.servers = [{ url = url; }]; + }; }; in { age.secrets.traefik_gcp_sa = { -- cgit 1.4.1