gleam-deploy
The gleam-deploy skill automates containerization of Gleam applications by detecting gleam.toml files, managing Gleam and Erlang versions through mise.toml or .tool-versions, and generating optimized Dockerfile patterns. Use this skill when deploying Gleam projects to create multi-stage Docker builds that export Erlang shipments for minimal runtime containers.
git clone --depth 1 https://github.com/nixopus/nixopus /tmp/gleam-deploy && cp -r /tmp/gleam-deploy/api/skills/gleam-deploy ~/.claude/skills/gleam-deploySKILL.md
# Gleam Deployment ## Detection Project is Gleam if `gleam.toml` exists in the root. ## Versions Gleam and Erlang default to latest. Override via `mise.toml` or `.tool-versions`. Erlang available in both build and runtime; Gleam only during build. ## Build ### Build Process 1. Install Gleam and Erlang 2. Export: `gleam export erlang-shipment` 3. Output: `./build/erlang-shipment/` ### Start Command ``` ./build/erlang-shipment/entrypoint.sh run ``` Source tree not included in final container by default. ## Install Stage Optimization Copy in order: - `gleam.toml`, `manifest.toml` (if present) - `src/` (Gleam source) - `test/` (optional) ## Base Images | Stage | Image | |---|---| | Build | `ghcr.io/gleam-lang/gleam:latest` or custom | | Runtime | `erlang:27-slim` | ## Dockerfile Patterns ### Erlang Shipment (minimal runtime) ```dockerfile FROM ghcr.io/gleam-lang/gleam:latest AS build WORKDIR /app COPY gleam.toml manifest.toml* ./ COPY src src RUN gleam export erlang-shipment FROM erlang:27-slim WORKDIR /app COPY --from=build /app/build/erlang-shipment ./ EXPOSE 8080 CMD ["./entrypoint.sh", "run"] ``` ### With source included ```dockerfile FROM ghcr.io/gleam-lang/gleam:latest AS build WORKDIR /app COPY . . RUN gleam export erlang-shipment FROM erlang:27-slim WORKDIR /app COPY --from=build /app/build/erlang-shipment ./ COPY --from=build /app/src ./src COPY --from=build /app/gleam.toml ./ CMD ["./entrypoint.sh", "run"] ```
Reference for all Nixopus API operations callable via nixopus_api(method, path, body)
Generate Caddyfile configurations for static sites and reverse proxies — SPA fallback routing, cache headers, compression, redirects, and error pages. Use when deploying a static site that needs custom Caddy configuration, or when the user needs SPA routing, caching, or redirect rules.
Generate docker-compose.yml for multi-service setups including databases, caches, and service dependencies. Use when the app needs a database, cache, message broker, or has multiple independently deployable services.
Size container memory and CPU limits, diagnose OOM kills and CPU throttling, and recommend resource adjustments by ecosystem. Use when containers are being OOM-killed, running slowly, or when setting initial resource limits for a deployment.
Build and deploy C/C++ applications — CMake, Meson, Ninja, and Dockerfile patterns. Use when deploying a C or C++ project, or when CMakeLists.txt or meson.build is detected.
Run database migrations safely during deployment — framework-specific commands, pre-deploy vs post-deploy timing, health gates, and rollback strategies. Use when the app has a database migration system and needs migrations run during deployment.
Build and deploy Deno applications — version detection, dependency caching, and Dockerfile patterns. Use when deploying a Deno project, or when deno.json or deno.jsonc is detected.
Sub-agent routing table — which agent handles diagnostics, machine health, infrastructure, GitHub, billing, and notifications. Load when the current task is not a direct deployment.