delonix compose

Suporte NATIVO a docker-compose.yml (Compose Spec v2.x) — sem Docker, sem shim, direto para o motor.

NATIVE support for docker-compose.yml (Compose Spec v2.x) — no Docker, no shim, straight into the engine.

Um tradutor de esquema estrangeiro, da mesma família do kind: Pod (k8s) e da API Docker: parser tipado à mão (sem dependência nova), traduzido directamente para o motor — containers reaproveitando o mesmo caminho do container run, redes/volumes reaproveitando network/volume apply verbatim (mesma idempotência, mesmo hardening de input). depends_on respeita as 3 condições reais do Compose Spec (service_started/service_healthy/service_completed_successfully) via ordenação topológica do grafo de serviços — um ciclo dá erro claro, nunca uma ordem arbitrária — e espera pelo healthcheck real (inline do serviço ou o da própria imagem). O projecto (compose down/ps/logs) é uma label nos containers; redes/volumes usam nomeação determinística (<projecto>_<nome>) — sem registo próprio, a mesma filosofia do stack describe.

A foreign-schema translator, the same family as kind: Pod (k8s) and the Docker API: a hand-written typed parser (no new dependency), translated directly into the engine — containers reusing the exact container run path, networks/volumes reusing network/volume apply verbatim (same idempotency, same input hardening). depends_on honors the 3 real Compose Spec conditions (service_started/service_healthy/service_completed_successfully) via topological ordering of the service graph — a cycle is a clear error, never an arbitrary order — and waits for the real healthcheck (inline in the service, or the image's own). The project (compose down/ps/logs) is a label on the containers; networks/volumes use deterministic naming (<project>_<name>) — no registry of its own, the same philosophy as stack describe.

Usage: dlx compose [OPTIONS] <COMMAND>

Commands:
  up      Creates/starts every service — build, then network, then volume, then containers in `depends_on` order (gated on the declared condition)
  down    Removes every container this project's `up` created (and, with `-v`, its named volumes). Networks/volumes marked `external: true` are NEVER removed
  ps      Containers of this project (derived from labels)
  logs    Logs of one service (default: every service, one after another)
  config  Validates and prints the resolved project, without creating anything (`docker compose config` equivalent)
  help    Print this message or the help of the given subcommand(s)

Options:
      --l18n <en|pt>  Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
  -h, --help          Print help

Por fazer, documentado (nunca em silêncio)

profiles/extends/configs/secrets top-level (usa kind: Secret em vez disso) / multi-ficheiro (-f a -f b/include:), build.target (selecção de estágio), deploy.replicas != 1, networks.*.ipv4_address fixo, e volumes anónimos (sem source explícito — precisa de semântica própria de limpeza, ainda por desenhar). working_dir: É aplicado (via container run -w/--workdir, novo) e uma porta sem host explícito (ports: ["80"]) GANHA uma porta livre real do host, em vez de recusar.

compose up

Creates/starts every service — build, then network, then volume, then containers in depends_on order (gated on the declared condition)

Usage: dlx compose up [OPTIONS]

Options:
  -f, --file <FILE>             
      --l18n <en|pt>            Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
  -p, --project-name <PROJECT>  
      --dry-run                 Prints the resolved project (containers/networks/volumes) and exits without creating anything
  -d, --detach                  Accepted for `docker compose` compatibility. Services already start detached here (this engine has no daemon holding them), so this is a no-op rather than an error — every existing script and CI job writes `up -d`, and rejecting it broke all of them for no behavioural gain
  -h, --help                    Print help

Exemplos

Sobe tudo (build, rede, volumes, containers, por ordem de `depends_on`)
delonix compose up
Ficheiro/projecto explícitos
delonix compose up -f infra/docker-compose.yml -p minhaapp
Só valida e mostra o plano, sem criar nada
delonix compose up --dry-run

compose ps

Containers of this project (derived from labels)

Usage: dlx compose ps [OPTIONS]

Options:
  -f, --file <FILE>             
      --l18n <en|pt>            Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
  -p, --project-name <PROJECT>  
  -h, --help                    Print help

Exemplos

Containers deste projecto
delonix compose ps

compose logs

Logs of one service (default: every service, one after another)

Usage: dlx compose logs [OPTIONS] [SERVICE]

Arguments:
  [SERVICE]  

Options:
  -f, --file <FILE>             
      --l18n <en|pt>            Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
  -p, --project-name <PROJECT>  
      --follow                  No short flag (unlike real `docker compose logs -f`) — `-f` is already `--file` on every subcommand of this group, for consistency across `up`/`down`/`ps`/`config`
  -h, --help                    Print help

Exemplos

Logs de um serviço
delonix compose logs db
Todos os serviços, um a seguir ao outro
delonix compose logs

compose config

Validates and prints the resolved project, without creating anything (docker compose config equivalent)

Usage: dlx compose config [OPTIONS]

Options:
  -f, --file <FILE>             
      --l18n <en|pt>            Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
  -p, --project-name <PROJECT>  
  -h, --help                    Print help

Exemplos

Valida e imprime o projecto resolvido (equivalente a `docker compose config`)
delonix compose config

compose down

Removes every container this project's up created (and, with -v, its named volumes). Networks/volumes marked external: true are NEVER removed

Usage: dlx compose down [OPTIONS]

Options:
  -f, --file <FILE>             
      --l18n <en|pt>            Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
  -p, --project-name <PROJECT>  
  -v, --volumes                 
  -h, --help                    Print help

Exemplos

Remove os containers deste projecto
delonix compose down
Remove também os volumes NOMEADOS (nunca os `external: true`)
delonix compose down -v

LaboratórioLab

Sobe um docker-compose.yml com uma app que só arranca depois da base de dados estar saudável (depends_on: condition: service_healthy).

delonix compose up -d
delonix compose ps
delonix compose logs -f app

Bring up a docker-compose.yml where the app only starts after the database is healthy (depends_on: condition: service_healthy).

delonix compose up -d
delonix compose ps
delonix compose logs -f app

DesafioChallenge

Corre compose down -v e confirma com delonix volumes ls que o volume nomeado do projecto foi mesmo removido — não só os containers.

Run compose down -v and confirm with delonix volumes ls that the project's named volume was actually removed — not just the containers.