Fix Dockerfile build order for phoenix-colocated
Some checks are pending
Build and Push Docker Image / build-and-push (push) Waiting to run

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 <noreply@anthropic.com>
This commit is contained in:
Kevin Sivic 2025-11-28 22:03:00 -05:00
parent 5da1762266
commit 5feb386963

View file

@ -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