Avoid $$host in compose env (breaks Coolify build-time.env)
Set FRAPPE_SITE_NAME_HEADER from currentsite.txt at frontend start instead of FRAPPE_SITE_NAME_HEADER=$$host which Coolify writes as an invalid $host= line in build-time.env.
This commit is contained in:
parent
7bdf4a0b9b
commit
dad0d613fe
2 changed files with 3 additions and 3 deletions
|
|
@ -174,13 +174,13 @@ services:
|
||||||
frontend:
|
frontend:
|
||||||
<<: *customizable_image
|
<<: *customizable_image
|
||||||
platform: linux/amd64
|
platform: linux/amd64
|
||||||
|
entrypoint: ['bash', '-c']
|
||||||
command:
|
command:
|
||||||
- nginx-entrypoint.sh
|
- export FRAPPE_SITE_NAME_HEADER=$$(tr -d '\r\n' < /home/frappe/frappe-bench/sites/currentsite.txt); exec nginx-entrypoint.sh
|
||||||
environment:
|
environment:
|
||||||
- SERVICE_FQDN_FRONTEND_8080
|
- SERVICE_FQDN_FRONTEND_8080
|
||||||
- 'BACKEND=backend:8000'
|
- 'BACKEND=backend:8000'
|
||||||
- 'SOCKETIO=websocket:9000'
|
- 'SOCKETIO=websocket:9000'
|
||||||
- 'FRAPPE_SITE_NAME_HEADER=$$host'
|
|
||||||
- 'UPSTREAM_REAL_IP_ADDRESS=${UPSTREAM_REAL_IP_ADDRESS:-127.0.0.1}'
|
- 'UPSTREAM_REAL_IP_ADDRESS=${UPSTREAM_REAL_IP_ADDRESS:-127.0.0.1}'
|
||||||
- 'UPSTREAM_REAL_IP_HEADER=${UPSTREAM_REAL_IP_HEADER:-X-Forwarded-For}'
|
- 'UPSTREAM_REAL_IP_HEADER=${UPSTREAM_REAL_IP_HEADER:-X-Forwarded-For}'
|
||||||
- 'UPSTREAM_REAL_IP_RECURSIVE=${UPSTREAM_REAL_IP_RECURSIVE:-off}'
|
- 'UPSTREAM_REAL_IP_RECURSIVE=${UPSTREAM_REAL_IP_RECURSIVE:-off}'
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ Copy from [`coolify.env.example`](../coolify.env.example). **Required before fir
|
||||||
| `ADMIN_PASSWORD` | yes | Frappe `Administrator` password |
|
| `ADMIN_PASSWORD` | yes | Frappe `Administrator` password |
|
||||||
| `INSTALL_APPS` | yes | `erpnext,payments,hrms,lending,lms` |
|
| `INSTALL_APPS` | yes | `erpnext,payments,hrms,lending,lms` |
|
||||||
| `SITE_NAME` | **no** (auto) | From Coolify domain via `SERVICE_FQDN_FRONTEND` |
|
| `SITE_NAME` | **no** (auto) | From Coolify domain via `SERVICE_FQDN_FRONTEND` |
|
||||||
| `FRAPPE_SITE_NAME_HEADER` | **no** (auto) | Compose sets `$$host` — nginx uses incoming Host header |
|
| `FRAPPE_SITE_NAME_HEADER` | **no** (auto) | Set at frontend start from `sites/currentsite.txt` |
|
||||||
|
|
||||||
> **Coolify env cache:** If you previously set `SITE_NAME=erp.example.com` in Coolify, **delete it** so compose defaults use your real domain. Changing `docker-compose.yml` defaults alone does not update stored values.
|
> **Coolify env cache:** If you previously set `SITE_NAME=erp.example.com` in Coolify, **delete it** so compose defaults use your real domain. Changing `docker-compose.yml` defaults alone does not update stored values.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue