Commit graph

2 commits

Author SHA1 Message Date
justin
dcea3c29bb portal: serve /files/ (logo) from stable host path, fix recurring 403
nginx served /files/ via alias straight into /var/lib/docker/volumes/... but
/var/lib/docker is root 0700 (no traverse for www-data) and docker resets that
perm on restart -> recurring 403 on /files/pw-logo.png (broken portal logo).

Sync the site's public /files/ into /opt/erpnext-assets/assets/files (already
www-data-owned, nginx-traversable, never touched by docker) during asset
extraction, and verify the logo is present. nginx /files/ alias must point here
(separate nginx change applied on server).
2026-06-02 22:18:30 -05:00
justin
c5e6bdbe6d deploy: fix recurring portal CSS breakage from ERPNext asset hash drift
The portal serves Frappe assets from a host copy (/opt/erpnext-assets). Frappe
emits content-hashed filenames that change on every ERPNext rebuild/migrate; the
host copy was never re-synced by deploy.sh, so the manifest referenced hashes
that 404'd on the host -> portal rendered with no CSS (recurring issue).

- Commit extract-erpnext-assets.sh (was untracked, prod-only). It now also runs
  bench build to keep assets.json consistent with dist/, copies the manifest,
  and verifies the login bundle exists on the host before finishing.
- deploy.sh: add an 'erpnext' target that rebuilds, runs bench migrate, and
  re-extracts assets. Plus a cheap drift guard on EVERY deploy that auto-heals
  by re-extracting if the portal manifest references a missing CSS bundle.
2026-06-02 22:12:33 -05:00