From b244007d981fc67529da409abe990c65ab80a938 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sun, 27 Jul 2025 10:53:52 -0500 Subject: [PATCH] Fix Gleam module compilation in Docker build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add src directory to Dockerfile COPY commands - Include gleam.toml in Docker build - Add mix gleam.compile step before mix compile - Fixes UndefinedFunctionError for :aprsme@encoding:sanitize_string/1 The Gleam source files weren't being included in the Docker build, causing the encoding module to be missing at runtime. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9d39a6d..b267880 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ RUN mix local.hex --force && \ ENV MIX_ENV=prod # Install mix dependencies -COPY mix.exs mix.lock ./ +COPY mix.exs mix.lock gleam.toml ./ COPY vendor vendor RUN mix deps.get --only $MIX_ENV && \ mix deps.compile @@ -32,6 +32,7 @@ RUN mix deps.get --only $MIX_ENV && \ # Copy and compile application COPY config config COPY lib lib +COPY src src COPY assets assets COPY priv priv COPY rel rel @@ -40,6 +41,7 @@ COPY rel rel RUN cd vendor/aprs && mix compile && cd ../.. && \ mkdir -p _build/prod/lib/aprs/ebin && \ cp -r vendor/aprs/_build/prod/lib/aprs/ebin/* _build/prod/lib/aprs/ebin/ && \ + mix gleam.compile && \ mix compile && \ mix assets.deploy && \ mix release