My problem is that the assets will be created in the current working directory. And I need them in ../myapp-releases/, but I don’t know exactly in which directory to place them.
All my attempts so far result in 404s for any CSS and JS files.
[debug] Converted error Phoenix.Router.NoRouteError to 404 response
[info] GET /assets/app-064645c1408a0fdfe1d2ab58d4944133.js
[info] Sent 404 in 270µs
Is there a place where the asset locations is configured? Maybe I changed it somehow.
In case it matters, I’m not using a webserver/reverse-proxy in front of Phoenix.
Are you sure Plug.Static in your endpoint is configured to serve those files? In older versions of phoenix css/js files were at the root not in the assets subfolder. You can also disable serving compressed files there iirc.
That was it. I had Plug.Static but it did not specify the assets directory. This is a 7 year old Phoenix project that I just converted to a recent Phoenix/Elixir. And I missed that.