KamalOps

Reusable helpers and mix kamal.* Mix tasks for operating Kamal deployments from Elixir projects.

Tasks

Conventions

Installer (Igniter)

If your project uses Igniter, you can run:

The installer:

If you pass --init, it will:

Example:

If the installer detects Postgres usage (heuristic: common deps like postgrex, ecto_sql, ash_postgres), it will also scaffold a Postgres accessory and generate POSTGRES_PASSWORD and DATABASE_URL in .kamal/secrets. You can force/disable this with --db / --no-db.

If you pass --example, it will also scaffold:

Minimal Kamal Setup (Single Server)

For a "hello world" Kamal setup, you usually only need:

The scaffolded config/deploy.yml uses Kamal's "local registry" (registry.server: localhost:5000) so you can avoid setting up an external Docker registry account on day 1.

Installation

If available in Hex, the package can be installed by adding kamal_ops to your list of dependencies in mix.exs:

def deps do
  [
    {:kamal_ops, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/kamal_ops.