Fix Gleam module compilation in Docker build
- 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 <noreply@anthropic.com>
This commit is contained in:
parent
8b3e433e61
commit
b244007d98
1 changed files with 3 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ RUN mix local.hex --force && \
|
||||||
ENV MIX_ENV=prod
|
ENV MIX_ENV=prod
|
||||||
|
|
||||||
# Install mix dependencies
|
# Install mix dependencies
|
||||||
COPY mix.exs mix.lock ./
|
COPY mix.exs mix.lock gleam.toml ./
|
||||||
COPY vendor vendor
|
COPY vendor vendor
|
||||||
RUN mix deps.get --only $MIX_ENV && \
|
RUN mix deps.get --only $MIX_ENV && \
|
||||||
mix deps.compile
|
mix deps.compile
|
||||||
|
|
@ -32,6 +32,7 @@ RUN mix deps.get --only $MIX_ENV && \
|
||||||
# Copy and compile application
|
# Copy and compile application
|
||||||
COPY config config
|
COPY config config
|
||||||
COPY lib lib
|
COPY lib lib
|
||||||
|
COPY src src
|
||||||
COPY assets assets
|
COPY assets assets
|
||||||
COPY priv priv
|
COPY priv priv
|
||||||
COPY rel rel
|
COPY rel rel
|
||||||
|
|
@ -40,6 +41,7 @@ COPY rel rel
|
||||||
RUN cd vendor/aprs && mix compile && cd ../.. && \
|
RUN cd vendor/aprs && mix compile && cd ../.. && \
|
||||||
mkdir -p _build/prod/lib/aprs/ebin && \
|
mkdir -p _build/prod/lib/aprs/ebin && \
|
||||||
cp -r vendor/aprs/_build/prod/lib/aprs/ebin/* _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 compile && \
|
||||||
mix assets.deploy && \
|
mix assets.deploy && \
|
||||||
mix release
|
mix release
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue