From 354c2d7609d8b6646852d9d99875ff639e3b0948 Mon Sep 17 00:00:00 2001 From: mathieu Date: Thu, 23 May 2024 21:59:28 +0200 Subject: [PATCH] config --- rules.yaml | 22 ------- deploy.md => traefik/deploy.md | 0 .../docker-compose.yml | 0 traefik/rules.yaml | 63 +++++++++++++++++++ traefik.yml => traefik/traefik.yml | 1 + 5 files changed, 64 insertions(+), 22 deletions(-) delete mode 100644 rules.yaml rename deploy.md => traefik/deploy.md (100%) rename docker-compose.yml => traefik/docker-compose.yml (100%) create mode 100644 traefik/rules.yaml rename traefik.yml => traefik/traefik.yml (96%) diff --git a/rules.yaml b/rules.yaml deleted file mode 100644 index 704dc1d..0000000 --- a/rules.yaml +++ /dev/null @@ -1,22 +0,0 @@ -http: - routers: - router-dsm: - rule: "Host(`huguettes.freeboxos.fr`) && PathRegexp(`(/nas|/photo|/file|/drive|/note)`)" - service: "service-dsm" - tls: - certresolver: myresolver - middlewares: - - nas-replacepathregex - services: - service-dsm: - loadBalancer: - passHostHeader: true - servers: - - url: "http://192.168.1.100:5000" - - - middlewares: - nas-replacepathregex: - replacepathregex: - regex: "^/nas/(.*)" - replacement: "/$1" \ No newline at end of file diff --git a/deploy.md b/traefik/deploy.md similarity index 100% rename from deploy.md rename to traefik/deploy.md diff --git a/docker-compose.yml b/traefik/docker-compose.yml similarity index 100% rename from docker-compose.yml rename to traefik/docker-compose.yml diff --git a/traefik/rules.yaml b/traefik/rules.yaml new file mode 100644 index 0000000..b0fe570 --- /dev/null +++ b/traefik/rules.yaml @@ -0,0 +1,63 @@ +http: + routers: + router-dsm: + rule: "Host(`huguettes.freeboxos.fr`) && PathRegexp(`(/nas|/photo|/file|/drive|/note)`)" + service: "service-dsm" + tls: + certresolver: myresolver + middlewares: + - replacepathregex-nas + router-vaultwarden: + rule: "Host(`huguettes.freeboxos.fr`) && Path(`/vaultwarden`)" + service: "service-dsm" + tls: + certresolver: myresolver + middlewares: + - replacepathregex-vaultwarden + router-gitea: + rule: "Host(`huguettes.freeboxos.fr`) && Path(`/gitea`)" + service: "service-dsm" + tls: + certresolver: myresolver + middlewares: + - replacepathregex-gitea + + services: + service-dsm: + loadBalancer: + passHostHeader: true + servers: + - url: "http://192.168.1.100:5000" + service-vaultwarden: + loadBalancer: + passHostHeader: true + servers: + - url: "http://192.168.1.100:4020" + service-gitea: + loadBalancer: + passHostHeader: true + servers: + - url: "http://192.168.1.100:3000" + + + middlewares: + replacepathregex-nas: + replacepathregex: + regex: "^/nas/(.*)" + replacement: "/$1" + replacepathregex-vaultwarden: + replacepathregex: + regex: "^/vaultwarden/(.*)" + replacement: "/$1" + replacepathregex-gitea: + replacepathregex: + regex: "^/gitea/(.*)" + replacement: "/$1" + +tls: + stores: + default: + defaultGeneratedCert: + resolver: myresolver + domain: + main: huguettes.freeboxos.fr diff --git a/traefik.yml b/traefik/traefik.yml similarity index 96% rename from traefik.yml rename to traefik/traefik.yml index befa7be..f606f11 100644 --- a/traefik.yml +++ b/traefik/traefik.yml @@ -41,6 +41,7 @@ api: providers: docker: endpoint: "unix:///var/run/docker.sock" + exposedByDefault: false file: