- Complete monorepo structure with pnpm workspaces - Prisma database schema with 20+ entities - NestJS API with 9 core modules - BullMQ orchestration worker - AWS and Azure provider adapters - Docker Compose infrastructure - Complete documentation
82 lines
1.9 KiB
YAML
82 lines
1.9 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: sdi-postgres
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: sdi_saas
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: sdi-redis
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: apps/api/Dockerfile
|
|
container_name: sdi-api
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
NODE_ENV: development
|
|
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/sdi_saas?schema=public
|
|
REDIS_URL: redis://redis:6379
|
|
PORT: 3000
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./apps/api:/app/apps/api
|
|
- ./packages:/app/packages
|
|
- /app/node_modules
|
|
- /app/apps/api/node_modules
|
|
command: pnpm --filter @sdi/api dev
|
|
|
|
worker:
|
|
build:
|
|
context: .
|
|
dockerfile: apps/worker/Dockerfile
|
|
container_name: sdi-worker
|
|
environment:
|
|
NODE_ENV: development
|
|
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/sdi_saas?schema=public
|
|
REDIS_URL: redis://redis:6379
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./apps/worker:/app/apps/worker
|
|
- ./packages:/app/packages
|
|
- /app/node_modules
|
|
- /app/apps/worker/node_modules
|
|
command: pnpm --filter @sdi/worker dev
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|