Svelixir.Config.Container (svelixir v0.11.0)

Copy Markdown

Container tooling — the container: section. Type-independent: podman and docker are valid for :otp and :web alike.

compose is ordered, and the order is load-bearing: [:none, :podman, :docker]. defenum/2 numbers keys by position, so rank is a comparison rather than a hand-written table.

compose is the canonical name, and canonically a tri-state. The scaffolder skills dispatch on two independent booleans, options.podman and options.docker, which is why their implication table lists :docker => podman. Collapsed onto one ordered key there is nothing to derive — :docker already outranks :podman — and the state those two booleans admit but no project can be, docker: true, podman: false, becomes unrepresentable. Those spellings are retired; see the mapping table in Svelixir.Config.

Summary

Functions

Raises compose to at least floor, leaving a higher setting alone.

Builds this section, and any nested block, from input.

Types

t()

@type t() :: %Svelixir.Config.Container{
  compose: atom(),
  local_ci: boolean(),
  prod_image: boolean(),
  sidecars: Svelixir.Config.Container.Sidecars.t()
}

Functions

at_least(container, floor)

@spec at_least(t(), atom()) :: t()

Raises compose to at least floor, leaving a higher setting alone.

Rank comes from defenum position, so :docker survives a :podman floor.

new!(input \\ [])

@spec new!(keyword() | map()) :: t()

Builds this section, and any nested block, from input.

valid?(self)