OpenParable
Skip to content
← Back to skills

Gleam Deploy

DevOps & Security
gleam-deploy

Gleam Deploy is an Agent Skill for devops & security published in the nixopus/nixopus repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Build and deploy Gleam applications — erlang-shipment, version detection, and Dockerfile patterns. Use when deploying a Gleam project, or when gleam.toml is detected.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/nixopus/nixopus/blob/HEAD/api/skills/gleam-deploy/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/gleam-deploy, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

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

StageImage
Buildghcr.io/gleam-lang/gleam:latest or custom
Runtimeerlang:27-slim

Dockerfile Patterns

Erlang Shipment (minimal runtime)

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

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"]