Deployment Guide
This guide explains how to deploy the Orders service to production. Read it once from top to bottom before your first release.
Before you start
You need:
- Access to the
orders-prodproject - The deployment CLI, version 3.2 or newer
- A reviewed and merged pull request
Tip: run
deploy doctorto check all of these at once.
Configuration
The service reads its settings from environment variables:
| Variable | Required | Example |
|---|---|---|
DATABASE_URL |
Yes | postgres://db:5432/orders |
QUEUE_URL |
Yes | amqp://queue:5672 |
LOG_LEVEL |
No | info |
Secrets
Never commit secrets. Store them in the secret manager and reference them by name:
env:
- name: DATABASE_URL
valueFrom: orders/database-url
Deploying
// deploy.config.js
export default {
service: "orders",
regions: ["eu-west-1", "us-east-1"],
healthCheck: "/healthz",
};
Run deploy release --canary to send 5 % of traffic to the new version first.
Rolling back
If error rates rise, roll back immediately:
deploy rollback orders --to previous
Checklist
- Migrations applied
- Canary healthy for 15 minutes
- Announce the release in #releases
Questions? See the runbook or ask in #platform.