Files

83 lines
2.0 KiB
YAML

services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: fleetforge
POSTGRES_PASSWORD: fleetforge
POSTGRES_DB: fleetforge
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U fleetforge"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
api:
build:
context: ../../
dockerfile: infrastructure/docker/Dockerfile.api
ports:
- "3000:3000"
environment:
DATABASE_URL: postgresql://fleetforge:fleetforge@postgres:5432/fleetforge?schema=public
REDIS_URL: redis://redis:6379
JWT_SECRET: dev-jwt-secret-do-not-use-in-production
SESSION_SECRET: dev-session-secret-do-not-use-in-production
NODE_ENV: development
LOG_LEVEL: debug
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ../../apps/api:/app
- /app/node_modules
- ../../infrastructure/migrations:/app/infrastructure/migrations
- ../../docs:/app/docs
worker:
build:
context: ../../
dockerfile: infrastructure/docker/Dockerfile.worker
environment:
DATABASE_URL: postgresql://fleetforge:fleetforge@postgres:5432/fleetforge?schema=public
NODE_ENV: development
depends_on:
postgres:
condition: service_healthy
volumes:
- ../../apps/worker:/app
- /app/node_modules
web:
build:
context: ../../
dockerfile: infrastructure/docker/Dockerfile.web
ports:
- "3001:3001"
environment:
NEXT_PUBLIC_API_URL: http://localhost:3000/api
depends_on:
- api
volumes:
- ../../apps/web:/app
- /app/node_modules
- /app/.next
volumes:
postgres_data: