This commit is contained in:
mathieu 2024-05-23 21:59:28 +02:00
parent 32a2484cf4
commit 354c2d7609
5 changed files with 64 additions and 22 deletions

View File

@ -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"

63
traefik/rules.yaml Normal file
View File

@ -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

View File

@ -41,6 +41,7 @@ api:
providers: providers:
docker: docker:
endpoint: "unix:///var/run/docker.sock" endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
file: file: