ClientUtils.Hosting (client_utils v0.7.0)

View Source

CodeMySpec hosting's pieces of a Phoenix app.

mix client_utils.hosting.install writes them; mix client_utils.hosting.upgrade bumps the workflow callers' pin and rewrites the files client_utils owns.

client_utils owns the four workflow callers, .kamal/secrets, .kamal/secrets-common (what a destination deploy resolves its secrets from), the release scripts rel/overlays/bin/server and rel/overlays/bin/migrate, and the health controller. The rest the installer writes once and leaves to the app: the Kamal destinations, the /health route, the release module and the OTel config in runtime.exs.

Nothing here needs Igniter; what does is in the two tasks.

Summary

Functions

A caller's content, pinned to pin.

The names of the thin workflow callers.

The OTLP endpoint every app exports to.

What mix client_utils.hosting.<task> says in an app with no igniter.

The workflows-v<N> tag this version pins its callers to.

Renders the template at path under priv/templates/hosting with assigns.

The release scripts, which must be executable.

Functions

caller(name, pin)

A caller's content, pinned to pin.

callers()

The names of the thin workflow callers.

collector()

The OTLP endpoint every app exports to.

no_igniter(task)

What mix client_utils.hosting.<task> says in an app with no igniter.

pin()

The workflows-v<N> tag this version pins its callers to.

render(path, assigns)

Renders the template at path under priv/templates/hosting with assigns.

scripts()

The release scripts, which must be executable.