Reference Architectures
Production Examples Catalog
Tested templates from the examples/ directory showing how devinfra plans and deploys static sites, containerized services, serverless functions, and background workers.
Storage + CDN
Diff Sync
yaml
project:
name: demo-static-site
provider: cloud
region: us-east-1
environment: dev
services:
web:
type: static
source: ./dist
deploy: object-storage
cdn: true
bash
cd examples/static-site
devinfra plan
devinfra deploy
# Returns active edge URL, e.g. https://cdn.example.com
Containers
Load Balancer
yaml
project:
name: fastapi-service
provider: cloud
region: us-east-1
environment: production
services:
api:
type: web
source: .
runtime: python
deploy: container
port: 8000
resources:
cpu: 1.0
memory: 2GB
health_check:
path: /health
interval_seconds: 15
bash
cd examples/fastapi-app
devinfra validate
devinfra plan
devinfra deploy
Serverless
API Gateway v2
yaml
project:
name: node-serverless-api
provider: cloud
region: us-east-1
environment: staging
services:
backend:
type: function
source: .
runtime: nodejs
deploy: function
entrypoint: index.main
bash
cd examples/node-app
devinfra deploy
Virtual Machine
Attached Storage
yaml
project:
name: background-worker
provider: cloud
region: us-east-1
environment: production
services:
worker:
type: worker
source: .
runtime: python
deploy: vm
resources:
cpu: 2.0
memory: 4GB
bash
cd examples/vm-app
devinfra plan
devinfra deploy
4 Cloud Targets
Single Manifest
yaml
project:
name: multi-service-sample
provider: cloud
region: us-east-1
environment: production
services:
frontend:
type: static
source: ./frontend
deploy: object-storage
cdn: true
api:
type: web
source: ./api
deploy: container
port: 8000
worker:
type: worker
source: ./worker
deploy: vm
webhook:
type: function
source: ./webhook
deploy: function
entrypoint: handler.main
Full-Stack
Stateful
bash
cd examples/employee-crud
devinfra validate
devinfra plan
devinfra deploy