Tips & tricks
5 prongo.yaml tips that save you time
Small config habits that prevent the most common deploy surprises: ordering, links, replicas, migrations and keeping secrets out of the file.
· 1 min read
In short
- Declare depends_on instead of hoping services start in the right order
- Link services with {{ name.url }} and keep secrets in the dashboard
- Add pre_deploy for migrations and start with one replica
The prongo.yaml file is short on purpose, which makes a handful of habits go a long way. Here are five.
1. Always declare depends_on
Without it, services start in whatever order is convenient. With it, the platform waits for the dependency to run first.
api:
build: ./apps/api
depends_on: [database]
2. Link services, never type addresses
The address of another service is generated, so reference it:
web:
env:
API_URL: "{{ api.url }}"
3. Keep secrets out of the file
Anything you would not publish goes in the dashboard under secrets, not in the yaml. Read how to share variables without leaking them.
4. Put migrations in pre_deploy
api:
pre_deploy: [npm run migrate]
If the command fails the deploy stops and the old version keeps serving. Seeds must be safe to repeat, see migrations on every deploy.
5. Start with one replica
replicas accepts 1 to 10, but each replica uses its own memory and CPU against your plan limits. Add more when traffic or availability needs it, not by default.
Putting it together
project: shop
services:
database:
image: postgres:16
port: 5432
api:
build: ./apps/api
port: 8080
depends_on: [database]
pre_deploy: [npm run migrate]
web:
build: ./apps/web
port: 3000
depends_on: [api]
env:
API_URL: "{{ api.url }}" Frequently asked questions
How many replicas should I start with?
One. Each replica uses its own memory and CPU and counts against your plan limits, so scale up only when you have a reason to.
Can I put a database password in prongo.yaml?
No. The file lives in git. Set passwords as secrets in the dashboard and they are injected as environment variables.