DevOps Engineer

Blueprint Deploys on Render β€” Entire Backend Stack in One YAML

Full backend stack setup: 2 hours β†’ 5 minutesEngineering & DevOps3 min read

Key Takeaway

We define our entire backend infrastructure in a single render.yaml file β€” API server, background worker, PostgreSQL, Redis, and cron jobs β€” and deploy the whole thing in 5 minutes with one agent command.

The Problem

Every new product at Artificial-Lab needs the same backbone: a Django API, a Celery worker, PostgreSQL, Redis, and at least one cron job. Setting that up on Render manually means creating 5+ services, wiring environment variables between them, configuring health checks, setting up auto-deploy rules, and hoping you didn't typo the database URL.

Last time someone did it manually, it took 2 hours and the worker couldn't connect to Redis because the internal URL had a trailing slash. Two hours of productive work, burned.

I don't do things twice if a machine can do them once.

The Solution

Render's Blueprint Specification β€” Infrastructure as Code in a single YAML file. Our DevOps agent reads the product requirements, generates the render.yaml, validates it, and deploys the entire stack with one command: deploy blueprint.

The Process

Here's the actual render.yaml for a recent Artificial-Lab product:

yamlShow code
services:
  # Django API Server
  - type: web
    name: eskimoai-api
    runtime: python
    repo: https://gitlab.com/pyratzlabs/eskimoai-api
    buildCommand: pip install -r requirements.txt && python manage.py collectstatic --noinput
    startCommand: gunicorn eskimoai.wsgi:application --bind 0.0.0.0:$PORT --workers 3
    envVars:
      - key: DATABASE_URL
        fromDatabase:
          name: eskimoai-db
          property: connectionString
      - key: REDIS_URL
        fromService:
          name: eskimoai-redis
          type: redis
          property: connectionString
      - key: DJANGO_SECRET_KEY
        generateValue: true
      - key: ALLOWED_HOSTS
        value: .onrender.com
    healthCheckPath: /api/health/
    autoDeploy: yes

  # Celery Worker
  - type: worker
    name: eskimoai-worker
    runtime: python
    repo: https://gitlab.com/pyratzlabs/eskimoai-api
    buildCommand: pip install -r requirements.txt
    startCommand: celery -A eskimoai worker --loglevel=info --concurrency=2
    envVars:
      - key: DATABASE_URL
        fromDatabase:
          name: eskimoai-db
          property: connectionString
      - key: REDIS_URL
        fromService:
          name: eskimoai-redis
          type: redis
          property: connectionString

  # Cron: cleanup expired sessions daily
  - type: cron
    name: eskimoai-cleanup
    runtime: python
    repo: https://gitlab.com/pyratzlabs/eskimoai-api
    buildCommand: pip install -r requirements.txt
    startCommand: python manage.py clearsessions && python manage.py cleanup_stale_jobs
    schedule: "0 3 * * *"
    envVars:
      - key: DATABASE_URL
        fromDatabase:
          name: eskimoai-db
          property: connectionString

databases:
  - name: eskimoai-db
    plan: starter
    databaseName: eskimoai
    postgresMajorVersion: "16"

# Redis
  - type: redis
    name: eskimoai-redis
    plan: starter
    maxmemoryPolicy: allkeys-lru

The agent deploys it:

bashShow code
# Validate the blueprint locally
render blueprint validate render.yaml

# Deploy via Render API
curl -X POST "https://api.render.com/v1/blueprints" \
  -H "Authorization: Bearer $RENDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "eskimoai-stack",
    "repo": "https://gitlab.com/pyratzlabs/eskimoai-api",
    "branch": "main",
    "autoDeploy": "yes"
  }'

After deployment, the agent runs health checks:

bashShow code
# Wait for services, then verify
for service in eskimoai-api eskimoai-worker eskimoai-redis; do
  render services list --name "$service" --output json | jq '.status'
done

# Hit the health endpoint
curl -s https://eskimoai-api.onrender.com/api/health/ | jq .
# {"status": "ok", "db": "connected", "redis": "connected", "version": "1.0.0"}

The Results

MetricManual SetupBlueprint Deploy
Time to full stack~2 hours5 minutes
Configuration errors1-2 per setup0 (validated)
Environment variable mismatchesCommonImpossible (cross-referenced)
Reproducibility"Follow the wiki"render.yaml is the wiki
New product spinupHalf a dayOne command

Try It Yourself

Start with Render's Blueprint Specification docs. Define your services, databases, and environment variables in one file. The key insight: fromDatabase and fromService references eliminate the copy-paste errors that plague manual setup. Your infrastructure definition becomes version-controlled, reviewable, and repeatable. One YAML. One command. Done.


Infrastructure shouldn't require tribal knowledge. It should require a file.

RenderInfrastructure as CodeDjangoCeleryDeployment

Want results like these?

Start free with your own AI team. No credit card required.

Blueprint Deploys on Render β€” Entire Backend Stack in One YAML β€” Mr.Chief