Fix Docker build by downloading vendor files during build

The Docker build was failing because vendor CSS files (leaflet.css, etc.)
were not available during the assets compilation step. Since vendor files
are in .gitignore, they need to be downloaded during the Docker build.

Added steps to the Dockerfile to:
- Copy the download-vendor-files.sh script into the build container
- Execute the script to download all vendor JS and CSS files
- This ensures vendor files are present before mix assets.deploy runs

This fixes the "Can't resolve '../vendor/leaflet.css'" error during
production deployments.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Graham McIntire 2025-07-21 10:05:59 -05:00
parent e7852e6201
commit 74767345fd
No known key found for this signature in database

View file

@ -50,6 +50,10 @@ COPY priv/gleam priv/gleam
# Compile Gleam files (using pre-compiled BEAM files)
RUN mix gleam_compile
# Download vendor JavaScript and CSS files
COPY assets/download-vendor-files.sh ./
RUN chmod +x download-vendor-files.sh && ./download-vendor-files.sh
# Compile assets
RUN mix assets.deploy