docker-containers/traefik/custom_service.yaml
2023-04-04 17:05:31 +08:00

28 lines
598 B
YAML

ttp:
routers:
custom-secure:
rule: "Host(`url_service`)"
service: "custom-service"
entrypoints: ["https"]
middlewares:
- "custom-https-redirect"
tls:
certResolver: "http"
psw:
rule: "Host(`url_service`)"
entrypoints: ["http"]
middlewares:
- "custom-https-redirect"
service: "custom-service"
middlewares:
custom-https-redirect:
redirectScheme:
scheme: "https"
permanent: true
services:
custom-service:
loadBalancer:
servers:
- url: "http://service:80"