Podmaker
All pages
Use

Projects and deployments

Create a project, describe how it runs, store secrets, deploy, approve production and roll back.

Projects and deployments

1. Create the project and its environments

podmaker project create shop --repository git@github.com:you/shop.git   # repository is optional
podmaker project env-create shop staging    --kind staging    --server app-01
podmaker project env-create shop production --kind production --server app-01
  • An environment runs on one server (Docker Compose) or on a cluster (--cluster swarm-1, see clusters).
  • production environments require a human approval for every deployment.
  • On the server, each environment is a Compose project named imp-<project>-<env>.

2. Describe how it runs

The environment config is JSON. Keep it in your repository (for example deploy/staging.json) and apply it with:

podmaker project env-config shop staging deploy/staging.json     # or - for stdin

A complete example for a Laravel app:

{
  "profile": "laravel",
  "compose": "services:\n  app:\n    image: ${IMP_IMAGE}\n    ports: [\"127.0.0.1:8101:8080\"]\n    environment:\n      APP_KEY: ${APP_KEY}\n      LOG_CHANNEL: stderr\n      DB_HOST: ${DB_HOST}\n      DB_DATABASE: ${DB_DATABASE}\n      DB_USERNAME: ${DB_USERNAME}\n      DB_PASSWORD: ${DB_PASSWORD}\n  horizon:\n    image: ${IMP_IMAGE}\n    command: php artisan horizon\n",
  "image": { "repository": "ghcr.io/you/shop", "registry": "ghcr" },
  "build": { "context": ".", "dockerfile": "Dockerfile" },
  "web": { "service": "app", "port": 8080, "health_path": "/up", "timeout_seconds": 120 },
  "secrets": ["APP_KEY"],
  "rollback": { "on_failed_health_check": true }
}
Key Meaning
compose A Docker Compose file as a string. ${IMP_IMAGE} is replaced by the image being deployed (always pinned @sha256:). ${NAME} is replaced by secrets and service-binding variables.
web.service, web.port The service that serves HTTP and its port inside the container. Podmaker adds a health check (wget/curl must exist in the image) unless the service defines one.
web.health_path, web.timeout_seconds The URL that must answer 2xx/3xx, and how long to wait for it.
secrets Secret names the compose file uses. A deployment is refused while one is missing.
image.repository, image.registry Where images live. registry is the name of a registry login.
build Dockerfile and context for builds from Git.
profile: laravel Adds hooks: migrate before the new containers start, optimize after, horizon:terminate when a horizon service exists. Health path defaults to /up.
hooks.before_up, hooks.after_up Explicit hooks: laravel.migrate, laravel.optimize, laravel.horizon.terminate, laravel.cache.clear, laravel.storage.link, each with the service to run in.
backup.before_deploy Accepted by the schema but not acted on yet. Take a backup yourself before risky migrations (podmaker backup create, see backups).
rollback.on_failed_health_check Default true: a deployment that never becomes healthy is rolled back to the previous revision.
strategy, replicas, kubernetes Cluster runtimes only. Compose always recreates.

To make an app reachable through a domain, publish its port on loopback (127.0.0.1:<port>:<container port>) and add a domain route to 127.0.0.1:<port>. Each environment on a server needs its own host port.

Log to the container’s output, not to files inside it: Podmaker shows docker logs. For Laravel set LOG_CHANNEL: stderr (as above), otherwise errors only land in storage/logs/laravel.log inside the container.

3. Secrets

printf '%s' "base64:$(openssl rand -base64 32)" | podmaker project secret-set shop production APP_KEY
podmaker project secrets shop production          # names only, never values
podmaker project secret-delete shop production OLD_TOKEN

Secrets are encrypted with the master key (envelope encryption) and sent only to the agent that deploys them. They never appear in logs, API responses or the audit log. Changing a secret takes effect at the next deployment.

4. Private registries

printf '%s' "$GHCR_TOKEN" | podmaker registry add ghcr --host ghcr.io --username you
podmaker registry list

Reference it with "image": {"registry": "ghcr", ...}. The credential is stored encrypted and is used both ways:

  • Pull: before a Compose deployment pulls, the agent logs in to that registry. The registry host is part of the deployment task, which is signed for production. The username and password come over the task’s secrets channel. The agent writes them to a private Docker config for that deployment only and deletes it afterwards. They never reach the project’s .env, logs or the audit log. Every image in the compose file that comes from the same host is pulled with the login.
  • Push: builders push to it (builds from Git).

Agents need version support for logins (capability docker.compose.registry_auth). Older agents get AGENT_UPGRADE_REQUIRED; run podmaker agent upgrade <server>. Swarm and Kubernetes environments do not log in yet: use public images there, or registries the nodes are already logged in to.

A registry on the Podmaker server itself: deploy/production/server/registry.sh runs one (HTTPS with a password through Caddy). Images built on that server can also be referenced as 127.0.0.1:5000/<repo>@sha256:... without a login.

5. Deploy

Deploy an image, preferably pinned by digest. A tag is accepted, but a digest guarantees that staging and production run exactly the same bytes and that a rollback returns to them:

podmaker deploy ghcr.io/you/shop@sha256:4f1c... --project shop --env staging

In the panel: Projects, pick the environment, enter the image and click Deploy.

What happens:

  1. Pull the image on the target server.
  2. before_up hooks (migrations) run in a one-off container of the new image (docker compose run --rm). If one fails, the deployment stops and the old version keeps running.
  3. Recreate the containers and wait for the health check.
  4. after_up hooks.
  5. Record a revision. If the app is unhealthy, roll back automatically.

Follow it live: podmaker deploy status <id> or Operations in the panel.

Production approvals

A production deployment stops at awaiting approval:

podmaker deploy list --status awaiting_approval
podmaker deploy approve <deployment-id>        # or reject --reason "..."

Or use Approve and deploy / Reject in Projects. Approvals are signed (Ed25519) and checked again by the agent before it acts, so a compromised Control Plane database cannot fake one. Service accounts and AI agents can request production deployments but can never approve them.

Roll back

podmaker project revisions shop production
podmaker deploy rollback <deployment-id>       # back to the previous successful revision

Health of an app

Each environment on its project page has a Health card for the last 24 hours:

  • Uptime: minutes its web container was running and healthy (24 h and 7 days).
  • Traffic: requests, server errors (5xx) and average response time of its domains, read from the edge’s Caddy.
  • Resources: CPU and memory of its containers.
  • Log errors: error lines in its containers’ logs, and the last one.

The dashboard lists every app with the same figures, and the servers with their CPU, memory and disk. Data is kept for 8 days. To be told when something breaks, see Alerts and health.

Project settings

Click a project’s name on Projects to open its settings. For each environment there are:

  • Secrets: names and versions only. You can set a value, generate a random value or a Laravel key, or delete a secret. Missing secrets that the config needs are flagged.
  • Databases and caches: connect a shared instance on the server, or remove a binding (this asks for an approval).
  • Deployment config: edited as YAML, with the same keys as podmaker.yml. It is validated before it is saved.

The page also shows the repository link and the deploy key.

Run commands in an app

For one-off jobs (clear caches, run migrations, reset an admin password) you do not need SSH.

Saved commands live in podmaker.yml:

commands:
  cache-clear:    { command: php artisan optimize:clear, description: Clear caches }
  migrate:        { command: php artisan migrate --force }
  create-admin:   { command: "php artisan make:filament-user --name=Admin --email=admin@example.com --password=$$ADMIN_PASSWORD" }

podmaker analyze suggests the usual ones (Laravel, Django). Anyone who may deploy can run them:

  • in the panel: the environment’s terminal button → Saved commands;
  • in the CLI: podmaker run shop production cache-clear (without a name it lists them);
  • through an AI assistant (MCP: run_project_command).

Any command: only full admins (permission workload.exec; never AI agents):

  • in the panel: the terminal button → Any command;
  • in the CLI:
podmaker exec shop production -- php artisan migrate:status
podmaker exec shop production --service worker -- 'php artisan queue:failed | head'

How commands run:

  • There is no keyboard input: pass everything as arguments.
  • Commands run with sh -c in a running container of the web service, or the service you choose.
  • Output streams back as it happens.
  • Every command is recorded in the audit log. Do not type passwords into commands; read them from a secret instead ($$NAME in podmaker.yml becomes $NAME in the container).

Interactive terminal

A real shell (bash, or sh when the image has no bash) inside a container, in the browser. Full admins only (workload.exec; never AI agents).

  • Projects: the environment’s Terminal button opens its web container.
  • Servers → Containers: the Terminal button on any running container Podmaker manages. Containers it does not manage cannot be opened.

Good to know:

  • Changes to files inside a container are lost when it is redeployed; change the code or podmaker.yml instead.
  • Opening and closing are recorded in the audit log; what you type is not.
  • A terminal closes after 30 minutes without typing, after 4 hours, or when you close the window. At most 5 terminals per server at a time.
  • It opens once the server’s agent is free: if a deployment is running there, it waits for it.

Stop and start environments

Staging or test copies can be stopped when they are not needed:

  • Stop (the power button on the environment) removes the containers and frees CPU and memory. Data in databases and volumes is kept.
  • Start deploys the last image again.
  • Stopping production needs the approval permission.

Inspect

In the panel, every project card shows its environments and the latest deployment and build. Click either one to open the history: deployments and builds of that project, ten per page, each with its live log (the operation timeline). While a build runs, the environment’s Build button turns into Cancel build; a commit that is already the latest build is not built again (deploy its image instead).

Logs: the Logs button of an environment (or Servers → server → Containers → Logs) opens the log viewer: the server’s containers grouped by project, shared service and Podmaker itself, with search, error/warning filters, follow mode (refreshes every 5 s), wrapping, copy and download.

podmaker project inspect shop
podmaker project bindings shop production      # attached databases/caches
podmaker project builds shop staging
podmaker container logs app-01 imp-shop-production-app-1 --tail 200