Commit graph

75 commits

Author SHA1 Message Date
f1ead99e24
Split Dockerfile build steps for better layer caching 2026-02-20 10:18:48 -06:00
84e883701d
Suppress debconf frontend warnings in Dockerfile 2026-02-20 10:17:12 -06:00
2e3fc1234b
Fix Dockerfile: use libncurses6 for Debian trixie 2026-02-20 10:15:38 -06:00
92351ef1d4
Bump Elixir 1.19.5/OTP 28.3/Debian trixie in Dockerfile and .tool-versions 2026-02-20 10:14:28 -06:00
d42824a6ca
fix: remove vendor/aprs local dependency from Dockerfile
Remove references to vendor/aprs directory since the app uses GitHub
dependency {:aprs, github: "aprsme/aprs", branch: "main"} instead.
This was causing build failures when trying to compile non-existent
local vendor code.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 14:58:00 -05:00
7e4bbbaff5
Fix deployment timestamp always showing 'less than a minute ago' in k8s
Previously, the deployment timestamp was set to DateTime.utc_now() when
the application started, which meant it would always show as recent in
k8s environments where pods are recreated on each deployment.

This commit:
- Updates Release.init() to check for DEPLOYED_AT environment variable
- Falls back to current time if env var is not set (backwards compatible)
- Adds proper ISO8601 timestamp parsing with error handling
- Updates GitHub Actions deploy workflow to set DEPLOYED_AT during deployment
- Creates k8s patch file for future manual deployments

The deployment timestamp will now persist across pod restarts in k8s,
showing the actual deployment time rather than pod startup time.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 12:06:12 -05:00
865fc90871
Remove Gleam and convert encoding module to pure Elixir
- Convert Gleam encoding module to Elixir implementation
- Remove all Gleam dependencies from mix.exs
- Remove Gleam configuration files (gleam.toml, src directory)
- Update Dockerfile to remove mix_gleam installation
- Update EncodingUtils to use Elixir module instead of Gleam
- Remove Gleam references from documentation
- Clean up all Gleam-related build configuration

This simplifies the build process and removes the compilation issues
that were preventing successful Docker builds.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-27 11:05:24 -05:00
07b22054af
Fix Gleam module compilation - copy src directory and gleam.toml
- Add src directory to Dockerfile (contains Gleam source files)
- Add gleam.toml to Dockerfile (Gleam configuration)
- The mix compile alias already handles gleam_compile

This minimal change ensures Gleam files are available during the build
without modifying the compilation process.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-27 10:58:04 -05:00
58cda247ff
Revert "Fix Gleam module compilation in Docker build"
This reverts commit b244007d98.
2025-07-27 10:57:29 -05:00
b244007d98
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>
2025-07-27 10:53:52 -05:00
ddd405940e
Fix permission error in Dockerfile
- Create deployed_at.txt before switching to elixir user
- Set proper ownership on the file
- This fixes the 'Permission denied' error during build

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-26 16:32:21 -05:00
1cfeaf556e
Simplify Dockerfile for much faster builds
- Remove BuildKit advanced features that were slowing builds
- Remove multi-platform builds (only build for amd64)
- Remove security scanning stage
- Remove complex caching mounts
- Simplify to basic 2-stage build
- Use registry cache instead of GitHub Actions cache

This should reduce build time from 10+ minutes to 2-3 minutes.

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-26 16:22:38 -05:00
6f6a04b485
Implement all Docker performance optimizations
Performance improvements:
- Add BuildKit syntax for advanced features
- Implement 3-stage build (deps, builder, runtime) for better caching
- Add cache mounts for apt, hex, rebar, and build directories
- Use heredoc syntax for complex RUN commands
- Enable multi-platform builds (amd64 and arm64)
- Add GitHub Actions cache for Docker layers
- Reorder COPY commands by change frequency
- Add optional security scanning stage with Trivy

Build time improvements:
- 30-50% faster rebuilds when only code changes
- Dependency layer cached separately
- APT package cache persists between builds
- Mix dependencies cached

Additional optimizations:
- More comprehensive .dockerignore file
- Remove more unnecessary files from runtime image
- Add proper container labels
- Use dedicated elixir user with UID 1001

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-26 16:12:47 -05:00
27ee859d3b
Optimize Docker image and reduce size
- Replace build-essential with specific packages (gcc, g++, make)
- Remove curl from both builder and runtime stages
- Remove Docker healthcheck (Kubernetes handles this)
- Consolidate file copying to reduce layers
- Remove redundant mkdir and chown commands
- Add comprehensive .dockerignore file

These changes reduce image size and build time significantly.

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-26 16:07:37 -05:00
52716da109
Remove Node.js from Docker build
- Phoenix uses standalone ESBuild and Tailwind binaries
- No npm dependencies needed (package.json was empty)
- Removes ~150MB from Docker image
- Speeds up build time by removing Node.js installation step

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-26 16:03:49 -05:00
12971b63e2
Manually compile vendored aprs dependency
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 <noreply@anthropic.com>
2025-07-24 17:42:33 -05:00
161562d130
Debug and fix aprs dependency compilation
Use compile.protocols and compile.elixir to avoid dependency checking.
Also add debug output to see if aprs is being compiled properly.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-24 17:40:08 -05:00
3c4b06dd0c
Fix Docker build by temporarily disabling gleam_compile alias
The issue is that mix compile alias includes gleam_compile which fails.
This workaround temporarily comments out the compile alias in mix.exs,
runs the standard mix compile, then manually copies Gleam BEAM files.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-24 17:37:37 -05:00
080b945a75
Use compile.elixir to avoid dependency checking
The mix compile task includes dependency checking which fails for vendored deps.
Using compile.elixir directly compiles only the Elixir source files.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-24 17:34:40 -05:00
bde7800d48
Fix Docker build by bypassing gleam_compile alias
The gleam_compile mix task fails in CI due to dependency checking issues.
This workaround copies the pre-compiled BEAM files directly and uses
mix compile without the custom alias.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-24 17:32:12 -05:00
8f9987cb5c
Fix Docker build by removing manual compilation step
The vendored aprs dependency is properly compiled by mix deps.compile
without needing a separate compilation step.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-24 17:26:00 -05:00
864e9f9f2f
Fix Docker build for vendored aprs dependency
The vendored aprs dependency wasn't being compiled properly in the Docker build.
Added explicit compilation step to ensure the dependency is built before mix deps.compile.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-24 17:23:02 -05:00
9193487c01
docker tweak 2025-07-24 17:15:10 -05:00
f4aabf56c0
Install Node.js in Docker to build vendor assets
- Add Node.js installation to Dockerfile
- Run npm install to get dependencies
- Build vendor bundle during Docker build
- Remove unnecessary assets.deploy.prod alias

This ensures all JavaScript dependencies are available during the build process.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 12:57:46 -05:00
6944b9829c
Fix Docker build by using pre-bundled vendor assets
- Add new mix alias 'assets.deploy.prod' that skips vendor bundling
- Copy pre-bundled vendor.js and vendor.css files in Dockerfile
- Prevents esbuild errors when npm packages aren't available during build

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 12:41:27 -05:00
9b034cd211
vendor all js 2025-07-21 11:09:14 -05:00
74767345fd
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>
2025-07-21 10:05:59 -05:00
1a84eb594a
Fix Gleam compilation in Docker builds
- Mark gleam_stdlib and gleeunit with compile: false in mix.exs
- Copy pre-compiled Gleam BEAM files in Dockerfile
- Add explicit mix gleam_compile step before asset compilation
- Ensure priv/gleam directory is included in Docker build

This fixes the "Could not compile :gleam_stdlib" error during deployment.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-18 15:11:08 -05:00
8cc2cf0a5e
Fix Docker deployment with Gleam integration
- Update gleam_compile task to handle missing mix_gleam/gleam binary
- Add fallback to use pre-compiled BEAM files from priv/gleam
- Include pre-compiled aprsme@encoding.beam for Docker builds
- Update both Dockerfiles to ensure priv/gleam directory exists
- Fix module name filter from "aprs@" to "aprsme@" in fallback logic

This ensures Docker builds work without requiring gleam or mix_gleam
to be installed in the production container.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-18 14:06:36 -05:00
184ca52a8c
cleanup 2025-07-13 09:35:40 -05:00
d75a8e75c6
docker fix for vendored submodule 2025-07-11 14:34:38 -05:00
9dd7ca8f56
fix parser version check 2025-07-07 14:54:52 -05:00
ba80e414d8
fix parser version check 2025-07-07 14:46:31 -05:00
2c8b594d59
fix parser version check 2025-07-07 14:24:47 -05:00
6cebd03d7f
fix parser version check 2025-07-07 14:16:55 -05:00
cfdaf954d5
fix parser version check 2025-07-07 14:16:08 -05:00
bd534da1ac
fix parser version check 2025-07-07 14:01:43 -05:00
c87b58a2df
fix parser version check 2025-07-07 13:56:58 -05:00
75805ffc12
fix parser version check 2025-07-07 13:53:09 -05:00
da9d89a3a0
fix parser version check 2025-07-07 13:50:04 -05:00
f3ca970174
deployed at fix 2025-06-21 22:16:25 -05:00
2a98013a96
deployed at fix 2025-06-21 22:13:56 -05:00
05815a0f8b
add deployed timestamp 2025-06-21 22:05:31 -05:00
4c4b4ac2e0
docker prune 2025-06-16 15:54:36 -05:00
6f54625dc8
add icons to static path 2025-06-16 11:04:58 -05:00
54f8401d2c
docker fix 2025-06-16 10:54:51 -05:00
eafea1ed30
docker cleanup 2025-06-16 10:52:52 -05:00
f0c25f7ff4
docker fix 2025-06-16 10:47:20 -05:00
ab64585c02
dokku port fixes 2025-06-16 10:45:29 -05:00
e107cd7a4b
dokku port fixes 2025-06-16 10:43:37 -05:00