You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... after mix deps.compile and before mix assets.deploy? This should make most Docker image builds faster because they won't have to download tailwind/esbuild every time anything in priv, lib, or assets changes.
I'd be happy to open a small PR to do this if it's alright with you!
@jyc I think it should be possible to add mix assets.setup instead of adding the tailwind and esbuild installs separately. We'd only need to check if the assets.setup task is actually available when generating the Dockerfile:
RUN mix deps.compile
<%= if @assets_setup_available? do %>mix assets.setup<% end %>
Thanks for making Phoenix! I noticed that in the default Dockerfile
mix assets.deploy
downloads tailwind & esbuild every time assets change:phoenix/priv/templates/phx.gen.release/Dockerfile.eex
Lines 46 to 55 in 69685f7
Do you think the default could be changed to run
... after
mix deps.compile
and beforemix assets.deploy
? This should make most Docker image builds faster because they won't have to download tailwind/esbuild every time anything in priv, lib, or assets changes.I'd be happy to open a small PR to do this if it's alright with you!
The only challenge is that it'd have to handle
--no-tailwind
and--no-esbuild
. Happy to take a stab at handling that too with some pointers; a cursory search forno-tailwind
didn't turn up anything: https://github.com/search?q=repo%3Aphoenixframework%2Fphoenix+no-tailwind&type=codeThe text was updated successfully, but these errors were encountered: