pier_
Reference

pier add

Add a resource

pier add <command>

Add a resource.

Subcommands

pier add app

pier add app [flags]

Add an app.

FlagValueDefaultDescription
--nameSTRINGApp name
--planSTRINGApp plan (e.g. app-s, app-m)
--replicas00Number of replicas
--autoscaleSTRINGAutoscale range min-max (e.g. 1-4); XOR with --replicas
--triggerTRIGGER,...Autoscale trigger type:value (cpu:70, memory:80, rps:50, latency:250ms); repeatable
--idle-afterSTRINGZero-traffic window before scale-to-zero (with --autoscale 0-N)
--imageSTRINGContainer image (static-image flow, skips build)
--portINTContainer port (required with --image)
--templateSTRINGScaffold from a starter template (e.g. node_hono, python_fastapi, go_fiber, rust_axum, dockerfile_caddy)
-y, --yesSkip confirmation prompt
--stageWrite the change to pier.yaml only — apply later with 'pier deploy'

pier add site

pier add site [flags]

Add a static site.

FlagValueDefaultDescription
--nameSTRINGSite name
--templateSTRINGScaffold from a starter template (e.g. site_nextjs, site_astro, site_vite, site_hugo, site_html)
-y, --yesSkip confirmation prompt
--stageWrite the change to pier.yaml only — apply later with 'pier deploy'

pier add pg

pier add pg [flags]

Add a Postgres instance.

FlagValueDefaultDescription
--nameSTRINGPostgres cluster name (CNPG cluster / Pier resource name)
--default-dbSTRINGDefault Postgres database name created with the cluster (required)
--planSTRINGSizing plan (e.g. pg-s, pg-m, pg-l)
--replicas00Number of replicas
--pg-versionSTRINGPostgres major version
-y, --yesSkip confirmation prompt
--stageWrite the change to pier.yaml only — apply later with 'pier deploy'

pier add bucket

pier add bucket [flags]

Add a bucket.

FlagValueDefaultDescription
--nameSTRINGBucket name
--access""Access level: public or private
-y, --yesSkip confirmation prompt
--stageWrite the change to pier.yaml only — apply later with 'pier deploy'

pier add volume

pier add volume [flags]

Add a persistent volume.

FlagValueDefaultDescription
--nameSTRINGVolume name
--size""Size (e.g. 1GB, 5GB)
--durability""Durability tier: standard (node-local, default) or ha (replicated, survives node failure). Immutable after creation.
-a, --appSTRINGAttach to an app (slug or slug/target)
--mountSTRINGMount path inside the app (required with --app non-interactively)
-y, --yesSkip confirmation
--stageWrite the change to pier.yaml only — apply later with 'pier deploy'

pier add domain

pier add domain [<domain>] [flags]

Add a custom domain.

ArgumentRequiredDescription
<domain>noDomain to add (e.g. app.example.com)
FlagValueDefaultDescription
-a, --appSTRINGApp ref (slug or slug/target)
-s, --siteSTRINGSite ref (slug or slug/target)
-y, --yesSkip confirmation
--stageWrite the change to pier.yaml only — apply later with 'pier deploy'

pier add target

pier add target <app> <name> [flags]

Add a deployment target to an app or site.

ArgumentRequiredDescription
<app>yesApp or site (name)
<name>yesNew target name (slug-shaped, e.g. canary)
FlagValueDefaultDescription
--branchSTRINGGit branch that deploys this target
--planSTRINGSizing plan (e.g. app-s, app-m)
--dockerfileSTRINGDockerfile path override (relative to build context)
-y, --yesSkip confirmation prompt

Global flags apply to every command.

Examples

pier add app --name api --plan app-s                      # build from ./Dockerfile
pier add app --name whoami --image traefik/whoami --port 80
pier add pg --name main --plan pg-s --default-db app
pier add domain api.example.com --app api
pier add target api canary --branch main
pier add app --stage                                       # write pier.yaml only

Behaviour

  • add declares; the resource is created on the platform immediately unless --stage is set, in which case it is written to pier.yaml and created by the next pier apply or pier deploy.
  • add is paired with rm; set changes an existing resource. create is used only for artifacts that are taken rather than declared (snapshots create, backups create).

On this page