Complete reference for raidframe.yaml project configuration.
The raidframe.yaml file defines your project's services, databases, and runtime configuration. Place it in your project root.
If you don't have one, RaidFrame auto-detects your stack and generates a default configuration on first deploy.
rf config generate
Detected: Node.js (Next.js 16)
Generated: raidframe.yaml
Services: 1 (web)
Database: none (add with rf add postgres)
Region: us-east-1
project: my-saas
region: us-east-1
services:
web:
type: web
build:
dockerfile: Dockerfile
port: 3000
health_check:
path: /api/health
interval: 10s
timeout: 5s
scaling:
min: 2
max: 20
target_cpu: 70
resources:
cpu: 2
memory: 4GB
domains:
- myapp.com
- www.myapp.com
api:
type: web
build:
context: ./services/api
dockerfile: Dockerfile
port: 8080
scaling:
min: 1
max: 10
worker:
type: worker
build:
context: ./services/worker
command: node worker.js
scaling:
min: 1
max: 5
target_queue_depth: 100
cleanup:
type: cron
build:
context: .
command: node scripts/cleanup.js
schedule: "0 3 * * *"
databases:
main:
engine: postgres
version: "16"
plan: pro
extensions:
- pgvector
- pg_trgm
cache:
engine: redis
version: "7.2"
plan: standard
maxmemory_policy: allkeys-lru
embeddings:
engine: vector
plan: standard
storage:
uploads:
type: object
public: true
max_file_size: 50MB
queues:
emails:
type: queue
max_retries: 3
dead_letter: true
env:
shared:
NODE_ENV: production
LOG_LEVEL: info
production:
STRIPE_KEY: "${secrets.STRIPE_LIVE_KEY}"
staging:
STRIPE_KEY: "${secrets.STRIPE_TEST_KEY}"
| Field | Type | Description |
|---|---|---|
dockerfile | string | Path to Dockerfile (default: Dockerfile) |
context | string | Build context directory (default: .) |
target | string | Multi-stage build target |
args | map | Build-time arguments |
| Field | Type | Description |
|---|---|---|
min | int | Minimum instances (default: 1) |
max | int | Maximum instances (default: 10) |
target_cpu | int | CPU % to trigger scale-up (default: 70) |
target_memory | int | Memory % to trigger scale-up |
target_rps | int | Requests/sec per instance to trigger scale-up |
target_queue_depth | int | Queue depth to trigger worker scale-up |
cooldown | duration | Wait time before scale-down (default: 5m) |
schedule | map | Time-based scaling rules |
| Field | Type | Options |
|---|---|---|
cpu | int/string | shared, 1, 2, 4, 8, 16, 32 |
memory | string | 512MB, 1GB, 2GB, 4GB, 8GB, 16GB, 32GB, 64GB |
gpu | string | t4, l40s, a100-40g, a100-80g |
| Field | Type | Description |
|---|---|---|
path | string | HTTP path to check (default: /) |
port | int | Port to check (default: service port) |
interval | duration | Check interval (default: 10s) |
timeout | duration | Request timeout (default: 5s) |
retries | int | Failures before unhealthy (default: 3) |
start_period | duration | Grace period after start (default: 30s) |
rf config validate
✓ raidframe.yaml is valid
Services: 4 (web: 2, worker: 1, cron: 1)
Databases: 3 (postgres, redis, vector)
Storage: 1 bucket
Queues: 1
Reference secrets and other values in your config:
env:
DATABASE_URL: "${databases.main.url}"
REDIS_URL: "${databases.cache.url}"
STORAGE_URL: "${storage.uploads.url}"
API_KEY: "${secrets.API_KEY}"
Secrets are set via the CLI and never stored in your config file:
rf secrets set API_KEY=sk_live_xxx STRIPE_KEY=sk_live_yyy