Production Examples Catalog

Tested templates from the examples/ directory showing how devinfra plans and deploys static sites, containerized services, serverless functions, and background workers.

1. Static Site & Global Edge CDN

React, Vite, or static HTML deployed to object storage with global edge CDN distribution and origin access control.

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

2. Containerized FastAPI Web Service

Python REST API packaged in Docker, pushed to container registry, and served on container services behind a Load Balancer.

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

3. Node.js Serverless Microservice

Event-driven JavaScript or TypeScript application running on Serverless Functions with HTTP API Gateway routing.

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

4. Virtual Machine Worker

Long-running background tasks or Celery queues on dedicated virtual machines with unified monitoring telemetry.

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

5. Multi-Service Architecture

Coordinated multi-tier deployment combining Storage CDN, Container API, Serverless webhook, and Worker VM in a single manifest.

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

6. Full-Stack Employee CRUD Application

Production sample featuring containerized API, environment variable injection, database connectivity, and health monitoring.

Full-Stack Stateful
bash
cd examples/employee-crud
devinfra validate
devinfra plan
devinfra deploy