robinvdvleuten
Cache manifest path in Umbrella Phoenix application
I’ve created a Phoenix Umbrella project containing two applications. They will both be served as separate endpoints. To share assets between them, I’ve created a new application called “assets”, which sole purpose is to have the “/priv/static” directory. Now I would like to share the assets with both endpoints, and I already configured the static plug for that;
plug Plug.Static,
at: "/",
from: :example_assets,
gzip: true,
only: ~w(css fonts images js favicon.ico robots.txt)
This works perfect in development. But when I build and start an release of one the endpoints, I run into the following error;
[error] Could not find static manifest at "/app/example_web/lib/example_web-0.1.0/priv/static/cache_manifest.json". Run "mix phx.digest" after building your static files or remove the configuration from "config/prod.exs".
How do I make my “example_web” endpoint aware of the cache manifest file in the “example_assets” directory? Thanks in advance for any help!
First Post!
LostKobrakai
I guess the cache manifest doesn’t yet support static assets in another application:
https://github.com/phoenixframework/phoenix/blob/3e1257c499ed51a67b072d73bf9b0397f68476dd/lib/phoenix/endpoint/supervisor.ex#L453-L467
You cannot use relative paths without Application.app_dir as mix and releases use different folder structures.








