docker-compose.yml
Rama main · réplica de lectura del repositorio original.
version: "3.8"
services:
# Janua API Service (Platform Auth - port 4100 per PORT_REGISTRY)
api:
build:
context: .
dockerfile: apps/api/Dockerfile
target: development
ports:
- "4100:4100"
environment:
- NODE_ENV=development
- PORT=4100
- API_PORT=4100
- DATABASE_URL=${DATABASE_URL:?set DATABASE_URL in an untracked local env file}
- REDIS_URL=${REDIS_URL:?set REDIS_URL in an untracked local env file}
- JWT_SECRET=${JWT_SECRET_KEY:?set JWT_SECRET_KEY in an untracked local env file}
- COOKIE_SECRET=dev-cookie-secret-change-in-production
- LOG_LEVEL=debug
volumes:
- ./apps/api:/app/apps/api
- ./packages:/app/packages
- /app/node_modules
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- janua-network
# PostgreSQL Database
postgres:
image: postgres:15-alpine
ports:
- "5432:5432"
environment:
- POSTGRES_USER=janua
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in an untracked local env file}
- POSTGRES_DB=janua_dev
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U janua -d janua_dev"]
interval: 10s
timeout: 5s
retries: 5
networks:
- janua-network
# Redis for sessions and caching
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- janua-network
# MailHog for email testing
mailhog:
image: mailhog/mailhog
ports:
- "1025:1025" # SMTP
- "8025:8025" # Web UI
networks:
- janua-network
volumes:
postgres_data:
redis_data:
networks:
janua-network:
driver: bridge