Processes¶
A process type is declared in your Procfile. PaaS supports four kinds:
| Type | Purpose | HTTP-routable | Scale via |
|---|---|---|---|
web |
HTTP-facing | ✅ | paas ps:scale web=N |
worker |
Background (queue, cron) | ❌ | paas ps:scale worker=N |
release |
One-off pre-deploy task | ❌ | runs once per deploy |
cron-* |
Scheduled cron job | ❌ | paas.toml [cron] |
Process Types¶
graph LR
A[Procfile] --> B[web]
A --> C[worker]
A --> D[cron]
A --> E[release]
B --> F[receives HTTP traffic]
C --> G[background jobs]
D --> H[scheduled tasks]
E --> I[runs before deploy]
Example Procfile¶
web: gunicorn app:app --bind 0.0.0.0:$PORT
worker: celery -A app worker --loglevel=info
release: python manage.py migrate
cron-cleanup: python scripts/cleanup.py
release process¶
Runs once on every deploy, before the new replicas roll out. Used for DB migrations, asset compilation, etc. If it fails, the deploy is rolled back.
Cron processes¶
Configured in paas.toml:
PaaS creates a Kubernetes CronJob for each entry.
Resource limits¶
Set per-process-type resource limits in paas.toml: