Configuration
Doku is configured through a single doku.yaml file at the root of your project. This file is generated by doku init and can be customized to control every aspect of your deployment pipeline.
Full Example
A complete doku.yaml with all available options:
yamldoku.yaml
name: acme-web
runtime: node
provider: aws
region: us-east-1
build:
command: npm run build
output: dist
node_version: "20"
env:
NODE_ENV: production
NEXT_TELEMETRY_DISABLED: "1"
deploy:
port: 3000
health_check: /api/health
health_check_interval: 10s
instances:
min: 2
max: 20
cpu: 0.5
memory: 512
timeout: 30s
canary:
enabled: true
steps: [5, 15, 30, 60, 100]
interval: 120s
error_threshold: 0.5%
latency_threshold: 500ms
environments:
staging:
region: us-east-1
instances:
min: 1
max: 3
env:
DATABASE_URL: ${{ secrets.STAGING_DATABASE_URL }}
production:
region: us-east-1
instances:
min: 2
max: 20
env:
DATABASE_URL: ${{ secrets.PROD_DATABASE_URL }}
notifications:
slack: https://hooks.slack.com/services/T00/B00/xxx
on: [deploy_start, deploy_success, deploy_failed, rollback]Configuration Reference
Top-level Fields
| Field | Type | Default | Description |
|---|---|---|---|
| name | string | — | Project name. Used for resource naming and dashboard display. |
| runtime | string | — | Application runtime. One of: node, python, go, ruby, docker. |
| provider | string | — | Cloud provider. One of: aws, gcp, azure. |
| region | string | us-east-1 | Default deployment region (e.g., us-east-1, europe-west1). |
Build Configuration
| Field | Type | Default | Description |
|---|---|---|---|
| build.command | string | — | Shell command to build your application. |
| build.output | string | dist | Directory containing build artifacts. |
| build.node_version | string | 20 | Node.js version for the build environment. |
| build.env | map | — | Environment variables available during build. |
Deploy Configuration
| Field | Type | Default | Description |
|---|---|---|---|
| deploy.port | number | 3000 | Port your application listens on. |
| deploy.health_check | string | /health | HTTP path for health check probes. |
| deploy.health_check_interval | duration | 10s | Time between health check probes. |
| deploy.instances.min | number | 2 | Minimum number of running instances. |
| deploy.instances.max | number | 10 | Maximum number of instances for autoscaling. |
| deploy.cpu | number | 0.25 | CPU allocation per instance in vCPUs. |
| deploy.memory | number | 512 | Memory allocation per instance in MB. |
| deploy.timeout | duration | 30s | Request timeout. |
Canary Configuration
| Field | Type | Default | Description |
|---|---|---|---|
| canary.enabled | boolean | true | Enable canary rollouts. |
| canary.steps | number[] | [10, 25, 50, 100] | Traffic percentage at each rollout step. |
| canary.interval | duration | 60s | Time to wait at each step before advancing. |
| canary.error_threshold | string | 1% | Error rate that triggers automatic rollback. |
| canary.latency_threshold | string | 1000ms | P99 latency that triggers automatic rollback. |
Environment Overrides
Use the environments block to override any top-level setting per environment. Environment-specific values are deep-merged with the base configuration.
yaml
# Base config applies to all environments
deploy:
instances:
min: 2
max: 10
# Override for staging only
environments:
staging:
deploy:
instances:
min: 1
max: 2Secrets
Reference secrets using
${{ secrets.KEY_NAME }} syntax. Set secrets with doku env set KEY_NAME=value --env production.Examples by Framework
yamldoku.yaml
name: my-nextjs-app
runtime: node
provider: aws
region: us-east-1
build:
command: npm run build
output: .next
node_version: "20"
deploy:
port: 3000
health_check: /api/health
instances:
min: 2
max: 10