about summary refs log tree commit diff
path: root/hosts
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-03-09 18:54:14 -0800
committerFranck Cuny <franck@fcuny.net>2022-03-09 18:54:14 -0800
commit051989b710356509c80d8dee13d627161e9da68a (patch)
tree7326397bbdc2f3927a269529df1317b1635b2d87 /hosts
parenttraefik: typo (diff)
downloadworld-051989b710356509c80d8dee13d627161e9da68a.tar.gz
traefik: make the rules as specific as possible
Otherwise, `git` will conflict, since it exists on both domains.
Diffstat (limited to 'hosts')
-rw-r--r--hosts/common/server/traefik.nix6
1 files 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 = {