From 12971b63e2c0c8656b0e9c33e86062d54b3f5a1b Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Thu, 24 Jul 2025 17:42:33 -0500 Subject: [PATCH] Manually compile vendored aprs dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The vendored dependency wasn't being found in the expected location. This approach manually compiles it and copies the compiled files to the correct location before running the main compilation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- Dockerfile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9069e72..045ff1b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,18 +46,22 @@ COPY gleam.toml gleam.toml # This is crucial for production builds where gleam compiler is not available COPY priv/gleam priv/gleam -# Compile dependencies first (including vendor/aprs) +# Compile all dependencies RUN mix deps.compile -# Check if aprs was compiled -RUN ls -la _build/prod/lib/aprs/ebin/ || echo "aprs not found" +# Manually compile the vendored aprs dependency +RUN cd vendor/aprs && \ + MIX_ENV=prod mix compile && \ + mkdir -p ../../_build/prod/lib/aprs/ebin && \ + cp -r _build/prod/lib/aprs/ebin/* ../../_build/prod/lib/aprs/ebin/ && \ + cd ../.. # Copy Gleam BEAM files before compiling the main app RUN mkdir -p _build/prod/lib/aprsme/ebin && \ cp priv/gleam/*.beam _build/prod/lib/aprsme/ebin/ || true -# Compile only the Elixir files without dependency checking -RUN mix compile.protocols && mix compile.elixir +# Now compile the main application +RUN mix compile # Install Node.js for asset building RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \