From 9a4a078bdeec08c78545b423bd3e971e41f3cf28 Mon Sep 17 00:00:00 2001 From: Rocket-Quack <202538874+Rocket-Quack@users.noreply.github.com> Date: Fri, 16 Jan 2026 13:04:34 +0100 Subject: [PATCH] docs: update Traefik v3 SITES_RULE usage and examples --- docs/02-setup/04-env-variables.md | 10 +++++----- docs/02-setup/05-overrides.md | 2 +- docs/02-setup/06-setup-examples.md | 4 ++-- docs/02-setup/07-single-server-example.md | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/02-setup/04-env-variables.md b/docs/02-setup/04-env-variables.md index 1001c888..c566ecd9 100644 --- a/docs/02-setup/04-env-variables.md +++ b/docs/02-setup/04-env-variables.md @@ -48,16 +48,16 @@ Then edit `.env` and set variables according to your needs. | Variable | Purpose | Default | When to Set | | ------------------- | ------------------------------------------------ | ------- | ---------------------------------------- | | `LETSENCRYPT_EMAIL` | Email for Let's Encrypt certificate registration | — | Required if using HTTPS override | -| `SITES` | List of domains for SSL certificates | — | Required if using reverse proxy override | +| `SITES_RULE` | List of domains for SSL (Traefik rule for TLS domain routing) | — | Required if using reverse proxy override | -**Format for `SITES`:** +**Format for `SITES_RULE`:** ```bash # Single site -SITES=`mysite.example.com` +SITES_RULE=Host(`mysite.example.com`) -# Wildcard (any subdomain) -SITES=`{any:.+}` +# Multiple sites +SITES_RULE=Host(`a.example.com`) || Host(`b.example.com`) ``` --- diff --git a/docs/02-setup/05-overrides.md b/docs/02-setup/05-overrides.md index 9188489d..156a6834 100644 --- a/docs/02-setup/05-overrides.md +++ b/docs/02-setup/05-overrides.md @@ -14,7 +14,7 @@ docker compose -f compose.yaml -f overrides/compose.mariadb.yaml -f overrides/co | **Proxy** | | | | compose.noproxy.yaml | Exposes the application directly on port `:8080` without a reverse proxy | | | compose.proxy.yaml | Uses Traefik as HTTP reverse proxy on port `:80` | You can change the published port by setting `HTTP_PUBLISH_PORT` | -| compose.https.yaml | Uses Traefik as HTTPS reverse proxy on Port `:443` with automatic HTTP-to-HTTPS redirect | `SITES` and `LETSENCRYPT_EMAIL` must be set. `HTTP_PUBLISH_PORT` and `HTTPS_PUBLISH_PORT` can be set. | +| compose.https.yaml | Uses Traefik as HTTPS reverse proxy on Port `:443` with automatic HTTP-to-HTTPS redirect | `SITES_RULE` and `LETSENCRYPT_EMAIL` must be set. `HTTP_PUBLISH_PORT` and `HTTPS_PUBLISH_PORT` can be set. | | **Redis** | | | | compose.redis.yaml | Adds Redis service for caching and background job queuing | | **TBD** | **The following overrides are available but lack documentation. If you use them and understand their purpose, please consider contributing to this documentation.** | diff --git a/docs/02-setup/06-setup-examples.md b/docs/02-setup/06-setup-examples.md index becf9442..5d9b569a 100644 --- a/docs/02-setup/06-setup-examples.md +++ b/docs/02-setup/06-setup-examples.md @@ -78,7 +78,7 @@ Setup Frappe/ERPNext using containerized MariaDB and Redis with Let's Encrypt SS **Requirements:** -- Set `LETSENCRYPT_EMAIL` and `SITES` environment variables +- Set `LETSENCRYPT_EMAIL` and `SITES_RULE` environment variables - DNS must point to your server IP ```sh @@ -93,7 +93,7 @@ docker compose -f compose.yaml \ docker compose --project-name -f ~/gitops/docker-compose.yml up -d ``` -> **Note:** Ensure your `SITES` variable is properly formatted. See [environment variables](04-env-variables.md) for the correct format. +> **Note:** Ensure your `SITES_RULE` variable is properly formatted. See [environment variables](04-env-variables.md) for the correct format. ## Create First Site diff --git a/docs/02-setup/07-single-server-example.md b/docs/02-setup/07-single-server-example.md index d4a459c9..6827dda6 100644 --- a/docs/02-setup/07-single-server-example.md +++ b/docs/02-setup/07-single-server-example.md @@ -142,7 +142,7 @@ cp example.env ~/gitops/erpnext-one.env sed -i 's/DB_PASSWORD=123/DB_PASSWORD=changeit/g' ~/gitops/erpnext-one.env sed -i 's/DB_HOST=/DB_HOST=mariadb-database/g' ~/gitops/erpnext-one.env sed -i 's/DB_PORT=/DB_PORT=3306/g' ~/gitops/erpnext-one.env -sed -i 's/SITES=`erp.example.com`/SITES=\`one.example.com\`,\`two.example.com\`/g' ~/gitops/erpnext-one.env +sed -i 's/SITES_RULE=Host(`erp.example.com`)/SITES_RULE=Host(`one.example.com`) || Host(`two.example.com`)/g' ~/gitops/erpnext-one.env echo 'ROUTER=erpnext-one' >> ~/gitops/erpnext-one.env echo "BENCH_NETWORK=erpnext-one" >> ~/gitops/erpnext-one.env ``` @@ -204,7 +204,7 @@ sed -i 's/DB_PASSWORD=123/DB_PASSWORD=changeit/g' ~/gitops/erpnext-two.env sed -i 's/DB_HOST=/DB_HOST=mariadb-database/g' ~/gitops/erpnext-two.env sed -i 's/DB_PORT=/DB_PORT=3306/g' ~/gitops/erpnext-two.env echo "ROUTER=erpnext-two" >> ~/gitops/erpnext-two.env -echo "SITES=\`three.example.com\`,\`four.example.com\`" >> ~/gitops/erpnext-two.env +echo 'SITES_RULE=Host(`three.example.com`) || Host(`four.example.com`)' >> ~/gitops/erpnext-two.env echo "BENCH_NETWORK=erpnext-two" >> ~/gitops/erpnext-two.env ``` @@ -253,7 +253,7 @@ Create environment file ```shell echo "ROUTER=custom-one-example" > ~/gitops/custom-one-example.env -echo "SITES=\`custom-one.example.com\`" >> ~/gitops/custom-one-example.env +echo 'SITES_RULE=Host(`custom-one.example.com`)' >> ~/gitops/custom-one-example.env echo "BASE_SITE=one.example.com" >> ~/gitops/custom-one-example.env echo "BENCH_NETWORK=erpnext-one" >> ~/gitops/custom-one-example.env ``` @@ -262,7 +262,7 @@ Note: - Change the file name from `custom-one-example.env` to a logical one. - Change `ROUTER` variable from `custom-one.example.com` to the one being added. -- Change `SITES` variable from `custom-one.example.com` to the one being added. You can add multiple sites quoted in backtick (`) and separated by commas. +- Change `SITES_RULE` variable to the one being added. You can add multiple sites with `Host(...) || Host(...)`. - Change `BASE_SITE` variable from `one.example.com` to the one which is being pointed to. - Change `BENCH_NETWORK` variable from `erpnext-one` to the one which was created with the bench.