From ad138ddb40331cc2afbdcfa38d27a0ba4e2ca755 Mon Sep 17 00:00:00 2001 From: Kevin Sivic Date: Mon, 1 Dec 2025 10:19:28 -0500 Subject: [PATCH] Fix Dockerfile: compile before assets.deploy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Run mix compile before mix assets.deploy so colocated hooks are generated - Fix Docker warnings: use AS instead of as, ENV key=value format 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 98c0f5c..49f659a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ ARG DEBIAN_VERSION=bookworm-20250610-slim ARG BUILDER_IMAGE="hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-debian-${DEBIAN_VERSION}" ARG RUNNER_IMAGE="debian:${DEBIAN_VERSION}" -FROM ${BUILDER_IMAGE} as builder +FROM ${BUILDER_IMAGE} AS builder # install build dependencies RUN apt-get update -y && apt-get install -y build-essential git \ @@ -53,12 +53,12 @@ COPY lib lib COPY assets assets -# compile assets -RUN mix assets.deploy - -# Compile the release +# Compile the project first (generates colocated hooks for esbuild) RUN mix compile +# compile assets (must happen after mix compile for colocated hooks) +RUN mix assets.deploy + # Changes to config/runtime.exs don't require recompiling the code COPY config/runtime.exs config/ @@ -76,9 +76,9 @@ RUN apt-get update -y && \ # Set the locale RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 +ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US:en +ENV LC_ALL=en_US.UTF-8 WORKDIR "/app" RUN chown nobody /app