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: