From 5feb38696349af8f3a6f112f36730682b075d286 Mon Sep 17 00:00:00 2001 From: Kevin Sivic Date: Fri, 28 Nov 2025 22:03:00 -0500 Subject: [PATCH] Fix Dockerfile build order for phoenix-colocated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The phoenix-colocated JS files are generated during Elixir compilation. Reordered steps to: 1. Compile Elixir code (generates phoenix-colocated files) 2. Copy assets 3. Deploy assets (esbuild can now find phoenix-colocated imports) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index d364f5c..6c67889 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,14 +23,16 @@ RUN mix deps.compile COPY config config COPY priv priv COPY lib lib + +# Compile the project (generates phoenix-colocated files) +RUN mix compile + +# Copy assets after compilation COPY assets assets -# Compile assets +# Compile and deploy assets RUN mix assets.deploy -# Compile the project -RUN mix compile - # Build release RUN mix release