Operations|~3 min read

7. Operations, Reliability & DevOps

Docker containerization, Terraform cloud infrastructure, database connection pooling, and disaster recovery runbooks.

01

Docker & Container Orchestration

Multi-stage production Dockerfiles and docker-compose configurations.

Containerized Production Setup

The SRA monorepo includes production-ready Docker configurations for all microservices:

yaml
version: '3.8'
services:
  frontend:
    build:
      context: .
      dockerfile: frontend/Dockerfile
    ports:
      - "3000:3000"
    environment:
      - NEXT_PUBLIC_BACKEND_URL=http://backend:5000

  backend:
    build:
      context: .
      dockerfile: backend/Dockerfile
    ports:
      - "5000:5000"
    environment:
      - DATABASE_URL=postgresql://postgres:pass@db:5432/sra
      - REDIS_URL=redis://redis:6379

  redis:
    image: redis:7-alpine
    ports:
      - "6379:6379"

Database Connection Pooling Architecture

To ensure high availability and prevent connection exhaustion:

  • Application Web Traffic: Connects through Supabase PgBouncer transaction pooler (port 6543) for short-lived queries.
  • Migrations & Backup Exports: Direct connection via DIRECT_URL (port 5432) bypasses poolers, preventing statement timeouts during large exports or schema updates.
Was this page helpful?

Help us improve the SRA enterprise documentation.