Skip to content

platform ​

pfy platform renders the platform's own stack (Manager, proxy, identity provider, database) from a local install.yaml, and can run the rendered Nomad jobs. You use it to install or upgrade the platform itself; application deploys use nomad.

Synopsis ​

bash
pfy platform <subcommand> [flags]

Description ​

Application jobs are rendered from data in the Manager. The platform is the exception: the Manager cannot render the jobs that run the Manager. So pfy platform renders from a local install.yaml, the operator-owned install configuration, for either Nomad or Docker Compose. The compose output is what the self-hosted bundle ships.

install.yaml is also where backup_targets are declared, the named destinations that a data store's backup.target resolves against (see data).

The rendered proxy prelude (Caddyfile) serves three route families ahead of the OIDC sign-in portal so that non-browser clients reach them: /api/cli/login/* (the pfy login device flow), /pilet-feed/*, and /language-packs/*. On each, any inbound X-Proxy-Auth is stripped and the real proxy secret is added on the outbound leg. /pilets/* stays behind the portal, because the Manager UI's uploads rely on the portal cookie.

Shared flags ​

FlagShortDescription
--install-iPath to install.yaml (default: install.yaml)
--targetRender target: nomad (default) or compose

platform render ​

Render the platform stack to files (or stdout).

bash
pfy platform render [--install install.yaml] [--target nomad|compose] [--out-dir <dir>]
FlagDescription
--out-dirDirectory to write rendered files into (prints to stdout if unset). No short form

Examples ​

bash
# Render the Nomad jobs into deploy/platform/
pfy platform render --out-dir deploy/platform

# Render the compose bundle to stdout
pfy platform render --target compose
Rendered deploy/platform/manager.nomad
Rendered deploy/platform/proxy.nomad
…
Rendered 4 files to deploy/platform (install 1a2b3c4d5e6f)

The trailing hash identifies the install.yaml contents the render came from. For the Nomad target, render also prints the nomad var put ... command that seeds the rendered proxy prelude (Caddyfile) into a Nomad variable; deploy runs that step for you.

platform deploy ​

Render the platform stack (nomad target only) and run each job.

bash
pfy platform deploy [--install install.yaml] [--out-dir deploy/platform] [--plan-only] [--skip-migrations]
FlagDescription
--out-dirDirectory to write rendered jobs into before running (default: deploy/platform). No short form
--plan-onlyRender + validate + nomad job plan, but do not run
--skip-migrationsDeploy even though install.yaml has no migrations: block. Only for installs where the database schema is applied by hand

Each rendered .nomad job is validated, then (unless --plan-only) run with nomad job run; the rendered proxy prelude is seeded into its Nomad variable first. Without a migrations: block in install.yaml the deploy stops with advice unless you pass --skip-migrations. For the compose target, platform deploy refuses (platform deploy currently supports --target nomad only); render and run docker compose up yourself.

Example ​

bash
pfy platform deploy --install install.yaml --plan-only   # review
pfy platform deploy --install install.yaml               # apply
Rendered deploy/platform/manager.nomad
…
Seeded <variable path> (<key>)
Running 'nomad job run deploy/platform/manager.nomad'...
…
✓ Platform stack applied (4 jobs)

With --plan-only the last line is ✓ Planned 4 platform jobs (nothing applied).

See Also ​