From 668fc6783be438ef7dc8677bdd76cfc3f0ad9fe0 Mon Sep 17 00:00:00 2001 From: justin Date: Tue, 2 Jun 2026 23:02:58 -0500 Subject: [PATCH] compose: give ERPNext CUSTOMER_JWT_SECRET + DATABASE_URL (fix portal drift) The erpnext service was missing both env vars that the portal needs: - CUSTOMER_JWT_SECRET: verifies /set-password magic-link tokens signed by the API. Without it, the set-password page resolved an empty/placeholder secret and showed 'Link invalid' for every customer onboarding link. - DATABASE_URL: lets www/orders.py read compliance_orders from Postgres for the portal's Compliance section. Both were present on api/workers but never wired to erpnext -> drift. Now the single ERPNext portal can actually verify invites and show compliance orders. --- docker-compose.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index ebf44a7..b658f25 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -143,6 +143,12 @@ services: - REDIS_QUEUE=redis://erpnext-redis:6379/1 - REDIS_SOCKETIO=redis://erpnext-redis:6379/2 - SOCKETIO_PORT=9000 + # Portal needs these: CUSTOMER_JWT_SECRET verifies the /set-password magic + # link tokens signed by the API; DATABASE_URL lets the /orders portal page + # read compliance_orders from Postgres. Without them the set-password link + # shows "Link invalid" and the portal Compliance section is empty. + - CUSTOMER_JWT_SECRET=${CUSTOMER_JWT_SECRET} + - DATABASE_URL=postgresql://pw:${DB_PASSWORD:-pw_dev_2026}@api-postgres:5432/performancewest volumes: - erpnext-frappe-public:/home/frappe/frappe-bench/apps/frappe/frappe/public - erpnext-erpnext-public:/home/frappe/frappe-bench/apps/erpnext/erpnext/public