Set up mix_gleam archive, gleam_stdlib, and gleeunit deps. Add Gleam
compiler to all Dockerfiles, CI workflows, nix shell, and .tool-versions.
Rewrite Numeric, QueryHelpers, and URLValidator from Elixir to Gleam with
full ExUnit test coverage. Update all callers to use the Gleam modules
directly via :towerops@module syntax. Remove duplicate sanitize_like/1
private functions in snmp.ex and trace.ex.
Reviewed-on: graham/towerops-web#98
- Set MIX_OS_DEPS_COMPILE_PARTITION_COUNT to 3 (match available cores)
- Enable Erlang JIT perf improvements
- Remove redundant hex/rebar installation calls (already done earlier)
This won't eliminate Docker compile time but should make better use of
the 3 available cores. Estimated savings: 1-2 minutes on build.
The --mount=type=cache,target=/root/.mix overlays shadow the hex
installation done in the prior non-cached RUN step. With a cold cache
the hex archive is absent, causing 'Could not find an SCM for dependency'
errors. Install hex and rebar inside each cache-mounted step instead.
Add explicit 'make' step in Dockerfile to compile the C NIF before
Elixir compilation. This ensures towerops_nif.so exists when the
Elixir code tries to load it.
The custom compiler task creates a bootstrap problem (needs to be
compiled before it can be used as a compiler), so we compile the
C NIF explicitly instead of relying on the compilers list.
- Rewrote Ping module to use system ping binary instead of raw ICMP
sockets which required CAP_NET_RAW privileges
- Added iputils-ping package to Docker images for production
- Added proper IP address validation before executing ping command
- Updated tests to account for 1 second minimum timeout of system ping
- System ping binary is setuid root and works without elevated privileges