From 1365662cbb7c32183460c0d1d0f85839fb8ca387 Mon Sep 17 00:00:00 2001 From: Revant Nandgaonkar Date: Fri, 14 Jan 2022 10:55:23 +0530 Subject: [PATCH] docs: fix add custom domain --- docs/add-custom-domain-using-traefik.md | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/docs/add-custom-domain-using-traefik.md b/docs/add-custom-domain-using-traefik.md index 54edd47e..569f18a4 100644 --- a/docs/add-custom-domain-using-traefik.md +++ b/docs/add-custom-domain-using-traefik.md @@ -1,4 +1,4 @@ -Add following labels to *-nginx service +Add following labels to `frontend` service ```yaml - "traefik.http.routers.custom-domain.rule=Host(`custom.localhost`)" @@ -15,28 +15,16 @@ Example: ```yaml frontend: - image: frappe/erpnext-nginx:${ERPNEXT_VERSION} - restart: on-failure - environment: - - FRAPPE_PY=erpnext-python - - FRAPPE_PY_PORT=8000 - - FRAPPE_SOCKETIO=frappe-socketio - - SOCKETIO_PORT=9000 + ... labels: - - "traefik.enable=true" - - "traefik.http.routers.frontend.rule=Host(${SITES})" + ... - "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" - - "${ENTRYPOINT_LABEL}" - - "${CERT_RESOLVER_LABEL}" - - "traefik.http.services.frontend.loadbalancer.server.port=80" - volumes: - - sites-vol:/var/www/html/sites:rw - - assets-vol:/assets:rw + ... ``` This will add `custom.localhost` as custom domain for `mysite.localhost`