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.
This commit is contained in:
justin 2026-06-02 23:02:58 -05:00
parent f6419759e6
commit 668fc6783b

View file

@ -143,6 +143,12 @@ services:
- REDIS_QUEUE=redis://erpnext-redis:6379/1 - REDIS_QUEUE=redis://erpnext-redis:6379/1
- REDIS_SOCKETIO=redis://erpnext-redis:6379/2 - REDIS_SOCKETIO=redis://erpnext-redis:6379/2
- SOCKETIO_PORT=9000 - 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: volumes:
- erpnext-frappe-public:/home/frappe/frappe-bench/apps/frappe/frappe/public - erpnext-frappe-public:/home/frappe/frappe-bench/apps/frappe/frappe/public
- erpnext-erpnext-public:/home/frappe/frappe-bench/apps/erpnext/erpnext/public - erpnext-erpnext-public:/home/frappe/frappe-bench/apps/erpnext/erpnext/public