Fix Dockerfile: compile before assets.deploy
- 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 <noreply@anthropic.com>
This commit is contained in:
parent
08e2dfa325
commit
ad138ddb40
1 changed files with 8 additions and 8 deletions
16
Dockerfile
16
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 BUILDER_IMAGE="hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-debian-${DEBIAN_VERSION}"
|
||||||
ARG RUNNER_IMAGE="debian:${DEBIAN_VERSION}"
|
ARG RUNNER_IMAGE="debian:${DEBIAN_VERSION}"
|
||||||
|
|
||||||
FROM ${BUILDER_IMAGE} as builder
|
FROM ${BUILDER_IMAGE} AS builder
|
||||||
|
|
||||||
# install build dependencies
|
# install build dependencies
|
||||||
RUN apt-get update -y && apt-get install -y build-essential git \
|
RUN apt-get update -y && apt-get install -y build-essential git \
|
||||||
|
|
@ -53,12 +53,12 @@ COPY lib lib
|
||||||
|
|
||||||
COPY assets assets
|
COPY assets assets
|
||||||
|
|
||||||
# compile assets
|
# Compile the project first (generates colocated hooks for esbuild)
|
||||||
RUN mix assets.deploy
|
|
||||||
|
|
||||||
# Compile the release
|
|
||||||
RUN mix compile
|
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
|
# Changes to config/runtime.exs don't require recompiling the code
|
||||||
COPY config/runtime.exs config/
|
COPY config/runtime.exs config/
|
||||||
|
|
||||||
|
|
@ -76,9 +76,9 @@ RUN apt-get update -y && \
|
||||||
# Set the locale
|
# Set the locale
|
||||||
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
|
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
|
||||||
|
|
||||||
ENV LANG en_US.UTF-8
|
ENV LANG=en_US.UTF-8
|
||||||
ENV LANGUAGE en_US:en
|
ENV LANGUAGE=en_US:en
|
||||||
ENV LC_ALL en_US.UTF-8
|
ENV LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
WORKDIR "/app"
|
WORKDIR "/app"
|
||||||
RUN chown nobody /app
|
RUN chown nobody /app
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue