Elixir/Phoenix production serve assets

Hi, I’m beginner in elixir/phoenix development.

I deployed my first phoenix app with distillery + bootleg, and i’m wondering what is the recipe to serve assets directly with nginx from a distillery release.

I just let phoenix host the static assets, phoenix is ‘fast enough’ for static hosting unless you really need to start eeking out performance.

If you need to though, I’d just have nginx host out the release’s priv/static directory for my application via try_files. Or only specific parts, whichever you need.

1 Like

I’ll second the notion of “just let phoenix/cowboy” serve the static assets. If you get to the point where you have enough traffic that serving assets is a performance problem it is time to use a CDN and start edge caching assets.