Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Deployers

The x-minienv block is keyed by target: configure exactly one. Pick the one whose prerequisites you already have.

Kubernetes

Deploys each compose service as its own Helm release. There is no chart to maintain in your repository.

Needs a reachable Kubernetes context:

x-minienv:
  k8s:
    context: minikube
    namespace: my-branch

Per-service overrides go under x-minienv-k8s-service.

Generated resources

Per compose service:

ResourceWhen
DeploymentdeploymentType: service (the default)
JobdeploymentType: job
ServicedeploymentType: service and service.create is true
ServiceAccountserviceAccount.create is true
ConfigMapconfigMapFrom names at least one file
Secretcompose environment or an env value takes a value from the local environment or an env_file

Once per namespace:

ResourceWhen
ngrok release: Deployment, ConfigMap, Secret, ServiceAccountany service publishes via ngrok

The target namespace is created on deploy if it does not already exist. On destroy it is left in place, unless removeNamespaceOnDestroy is true — then the whole namespace is deleted, including anything in it that minienv did not create.

Compose environment is split by where each value came from. A value written literally in the compose file is rendered inline on the container. A value taken from the local environment — ${VAR}, or the bare - VAR form — or from an env_file goes into a Secret named after the service and reaches the container through envFrom, so it never appears in the Deployment. An env entry under x-minienv-k8s-service whose value is ${VAR} is placed the same way.

Nothing else is derived from the compose file — no Ingress, PersistentVolumeClaim, HorizontalPodAutoscaler or PodDisruptionBudget. Anything else a service needs is declared explicitly, with configMapFrom or manifests.

Docker

Deploys the whole project to a single remote host as one docker compose project, over a transport.

Needs an SSH-reachable host running docker and its compose plugin:

x-minienv:
  docker:
    namespace: my-branch
    transport:
      ssh:
        host: dev-box.example.com
        identity: ~/.ssh/id_ed25519

Per-service overrides go under x-minienv-docker-service.

What reaches the remote host

Before the project is sent, minienv:

ChangeWhy
Renames the project to namespaceKeeps two environments on one host from colliding
Drops services marked skipAlong with any depends_on edge pointing at them
Clears build:Images are built locally and pulled by tag on the remote
Clears ports:Nothing is published to the remote host’s network
Drops bind mountsThe host paths do not exist there. Named volumes are kept
Adds a bind mount per copy entryPointed at where that entry is copied on the host
Drops env_file and label_fileTheir values are already in environment and labels
Pins image:To the repository and tag resolved for this run
Injects an ngrok serviceOnly when something publishes

Everything else — environment, healthcheck, command, depends_on, networks, named volumes — is passed through as written, already fully interpolated.

Every field of both blocks is listed in Configuration Reference.