diff --git a/docs/add-custom-domain-using-traefik.md b/docs/add-custom-domain-using-traefik.md index 569f18a4..fbea49a0 100644 --- a/docs/add-custom-domain-using-traefik.md +++ b/docs/add-custom-domain-using-traefik.md @@ -1,14 +1,13 @@ Add following labels to `frontend` service ```yaml - - "traefik.http.routers.custom-domain.rule=Host(`custom.localhost`)" + traefik.http.routers.custom-domain.rule: Host(`custom.localhost`) # Comment the entrypoints label if traefik already has default entrypoint set - - "traefik.http.routers.custom-domain.entrypoints=web" - - "traefik.http.middlewares.custom-domain.headers.customrequestheaders.Host=mysite.localhost" - - "traefik.http.routers.custom-domain.middlewares=custom-domain" - # Add following header only if TLS is needed in case of live server, use one of below - - "traefik.http.routers.custom-domain.tls.certresolver=myresolver" # For Single Bench - - "traefik.http.routers.custom-domain.tls.certresolver=le" # For Docker Swarm + traefik.http.routers.custom-domain.entrypoints: web + traefik.http.middlewares.custom-domain.headers.customrequestheaders.Host: mysite.localhost + traefik.http.routers.custom-domain.middlewares: custom-domain + # Add following header only if TLS is needed in case of live server + traefik.http.routers.custom-domain.tls.certresolver: main-resolver ``` Example: @@ -18,12 +17,11 @@ frontend: ... labels: ... - - "traefik.http.routers.custom-domain.rule=Host(`custom.localhost`)" - - "traefik.http.routers.custom-domain.entrypoints=web" - - "traefik.http.middlewares.custom-domain.headers.customrequestheaders.Host=mysite.localhost" - - "traefik.http.routers.custom-domain.middlewares=custom-domain" - # Add following header only if TLS is needed in case of live server - - "traefik.http.routers.custom-domain.tls.certresolver=myresolver" + traefik.http.routers.custom-domain.rule: Host(`custom.localhost`) + traefik.http.routers.custom-domain.entrypoints: web + traefik.http.middlewares.custom-domain.headers.customrequestheaders.Host: mysite.localhost + traefik.http.routers.custom-domain.middlewares: custom-domain + traefik.http.routers.custom-domain.tls.certresolver: main-resolver ... ```