Skip to content
Skip to content

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

FieldTypeDefaultDescription
namestringProject name. Used for resource naming and dashboard display.
runtimestringApplication runtime. One of: node, python, go, ruby, docker.
providerstringCloud provider. One of: aws, gcp, azure.
regionstringus-east-1Default deployment region (e.g., us-east-1, europe-west1).

Build Configuration

FieldTypeDefaultDescription
build.commandstringShell command to build your application.
build.outputstringdistDirectory containing build artifacts.
build.node_versionstring20Node.js version for the build environment.
build.envmapEnvironment variables available during build.

Deploy Configuration

FieldTypeDefaultDescription
deploy.portnumber3000Port your application listens on.
deploy.health_checkstring/healthHTTP path for health check probes.
deploy.health_check_intervalduration10sTime between health check probes.
deploy.instances.minnumber2Minimum number of running instances.
deploy.instances.maxnumber10Maximum number of instances for autoscaling.
deploy.cpunumber0.25CPU allocation per instance in vCPUs.
deploy.memorynumber512Memory allocation per instance in MB.
deploy.timeoutduration30sRequest timeout.

Canary Configuration

FieldTypeDefaultDescription
canary.enabledbooleantrueEnable canary rollouts.
canary.stepsnumber[][10, 25, 50, 100]Traffic percentage at each rollout step.
canary.intervalduration60sTime to wait at each step before advancing.
canary.error_thresholdstring1%Error rate that triggers automatic rollback.
canary.latency_thresholdstring1000msP99 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: 2

Secrets

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
Configuration — Doku Docs — Doku