learning_ai_notes/docker-compose.yml
saravanakumardb1 a71747e3fb chore(devops): add Dockerfiles, docker-compose, CI workflow, docker-prep script [C1-C5]
- backend/Dockerfile: multi-stage Node.js build (install → build → runtime)
- web/Dockerfile: multi-stage Next.js standalone build
- docker-compose.yml: backend (4016) + web (3000) with health check
- scripts/docker-prep.sh: pack @bytelyst/* tarballs + rewrite file: refs (--restore to undo)
- .github/workflows/ci.yml: backend (typecheck+test+build), web (typecheck+test+build), mobile (typecheck)
2026-03-19 08:47:04 -07:00

43 lines
1.2 KiB
YAML

version: "3.9"
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "4016:4016"
environment:
- NODE_ENV=production
- PORT=4016
- HOST=0.0.0.0
- JWT_SECRET=${JWT_SECRET:-dev-secret-change-me}
- COSMOS_ENDPOINT=${COSMOS_ENDPOINT:-}
- COSMOS_KEY=${COSMOS_KEY:-}
- COSMOS_DATABASE=${COSMOS_DATABASE:-bytelyst}
- DB_PROVIDER=${DB_PROVIDER:-memory}
- CORS_ORIGIN=${CORS_ORIGIN:-http://localhost:3000}
- PLATFORM_SERVICE_URL=${PLATFORM_SERVICE_URL:-http://localhost:4003}
- EXTRACTION_SERVICE_URL=${EXTRACTION_SERVICE_URL:-http://localhost:4005}
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:4016/health"]
interval: 30s
timeout: 5s
retries: 3
web:
build:
context: ./web
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- NEXT_PUBLIC_BACKEND_URL=http://backend:4016
- NEXT_PUBLIC_PLATFORM_URL=${PLATFORM_SERVICE_URL:-http://localhost:4003}
depends_on:
backend:
condition: service_healthy
restart: unless-stopped