Commit graph

1 commit

Author SHA1 Message Date
abounoone
a3cac96a17 fix: sync assets between backend overlay and named frontend volume
bench build writes compiled bundles to the backend container's overlay
filesystem (apps/*/public/dist/), while nginx reads from the named
frappe-project_assets volume. Without syncing, frontend serves stale
bundle hashes from the original image.

- Makefile: rewrite 'assets' target to run bench build then sync-assets
- Makefile: add 'sync-assets' target that:
  - copies dist/ directories from backend container to frappe-project_assets
  - updates assets.json in the volume
  - deletes the stale pickle-encoded assets_json key from Redis (skipped
    by bench clear-cache because it uses a raw key, not Frappe's prefixed cache)
  - restarts frontend
- overrides/compose.local-origin.yaml: fix socket.io "Invalid origin" by
  patching nginx to pass browser's real Origin header ($http_origin) instead
  of forcing the site name (erp.local), which mismatches when browser
  connects via localhost or an external domain

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 18:35:39 +00:00