fix(server): run assets.deploy as a mix release step

Without this, 'mix release' produced a tarball that had app.css/app.js
(so LiveView worked) but was missing cache_manifest.json and the digested
asset paths. Phoenix served the bare files OK, but the client-side
LiveView bootstrap timing was fragile: if a form was submitted before
the LiveSocket attached, the browser fell back to a native HTML GET,
producing bug-report URLs like /admin/hosts?host%5Bname%5D=repl.

Define a project releases/0 with a pre-assemble step that runs
assets.deploy, so minified + digested assets are baked into every
release tarball.

Also gitignore digested priv/static artifacts so dev-time byproducts
don't pollute commits.
This commit is contained in:
Carsten 2026-04-22 10:18:28 +02:00
parent bb2a88fb15
commit 1b031ecdc3
2 changed files with 35 additions and 1 deletions

14
.gitignore vendored
View file

@ -26,6 +26,20 @@
/agent/burrito_out/
/agent/dist/
# Phoenix digest artifacts (built into release; shouldn't be committed)
/server/priv/static/assets/
/server/priv/static/cache_manifest.json
/server/priv/static/*-*.ico
/server/priv/static/*-*.txt
/server/priv/static/*-*.txt.gz
/server/priv/static/*.gz
/server/priv/static/images/*-*
/server/priv/static/images/*.gz
# Playwright / screenshots (local verification artifacts)
/.playwright-mcp/
/*.png
# Editors / OS
.DS_Store
.vscode/