portler setup
Run installation, build and generation steps without starting services.
portler setup [service...] [--prod]
portler setup docker [service...] [--prod]- Always runs the top-level
setupfirst, from the project root. - Runs selected services' setup in dependency order, including their dependencies. With no names, selects every service.
- Each entry is a shell command, or a
{run, if_missing}/{run, always}/{run, watch: [files]}step; lists run sequentially. Output is inherited, with a heading naming each step and command. The first failure stops setup and reports its command and exit code. - Top-level setup receives process env,
use_envfiles, then top-levelenv. Service setup receives the same resolved env andport_envvalues asup. - Allocates/reuses development port assignments like
env. This writes.portler/state.jsonand may reserve ports, but starts no services, containers or proxy. - Writes a receipt per successful plain step to
.portler/setup.json, so a subsequentupskips it. Explicitsetupignores receipts: every plain step,watchstep andalwaysstep runs. Anif_missingstep still skips while its path exists (skip <command> (<path> exists)); delete the path to run it again. - With
--prod, uses production setup and env overrides, checksprod.requirebefore running anything and runs only the services inprod.services. Withdocker, resolves Docker-mode env; setup still runs on the host, never inside containers.
use_env files are read before the top-level setup runs, so a setup step cannot create or refresh a listed env file for the same invocation; such files must already exist (a missing file is skipped with a notice; up in development still requires it).
Steps run in their own process group without a controlling terminal, so Ctrl+C reaches the whole step. Prompts that read stdin still work, but anything opening /dev/tty directly (SSH passphrase prompts, sudo, gpg) fails; use an agent (ssh-agent, gpg-agent) or run that step yourself.
setup does not wait for databases or start dependencies. Steps requiring a running dependency belong in service setup used by up, or require that dependency to be available externally before invoking setup.
--file <path> selects a config. Kubernetes setup is not supported; run host setup separately before building images.
See Setup & production.