# docker-compose.overrride.yml # Docker Comose para entorno de desarrollo o development. services: gateway: image: nginx:alpine container_name: suitecoffee-gateway depends_on: suitecoffee-app: condition: service_healthy suitecoffee-auth: condition: service_healthy ports: - "80:80" # único puerto público (agregá 443 si después sumás TLS) volumes: - ./gateway/nginx.conf:/etc/nginx/nginx.conf:ro networks: - suitecoffee-net restart: unless-stopped suitecoffee-app: container_name: suitecoffee-app depends_on: suitecoffee-db: condition: service_healthy suitecoffee-tenants: condition: service_healthy build: context: ./services/app dockerfile: Dockerfile.development volumes: - ./services/app:/app env_file: - ./services/app/.env.development environment: - NODE_ENV=${NODE_ENV} command: npm run dev healthcheck: # IMPORTANTE: asegurate de tener curl instalado en la imagen de app (ver nota abajo) test: ["CMD-SHELL", "curl -fsS http://localhost:${APP_DOCKER_PORT}/health || exit 1"] interval: 10s timeout: 3s retries: 10 start_period: 20s restart: unless-stopped networks: - suitecoffee-net suitecoffee-auth: container_name: suitecoffee-auth depends_on: suitecoffee-db: condition: service_healthy build: context: ./services/auth dockerfile: Dockerfile.development volumes: - ./services/auth:/app env_file: - ./services/auth/.env.development environment: - NODE_ENV=${NODE_ENV} command: npm run dev restart: unless-stopped healthcheck: test: ["CMD-SHELL", "curl -fsS http://localhost:${AUTH_DOCKER_PORT:-4000}/health || exit 1"] interval: 10s timeout: 3s retries: 10 start_period: 15s networks: - suitecoffee-net suitecoffee-db: image: postgres:16 container_name: suitecoffee-db environment: POSTGRES_DB: ${DB_NAME} POSTGRES_USER: ${DB_USER} POSTGRES_PASSWORD: ${DB_PASS} volumes: - suitecoffee-data:/var/lib/postgresql/data restart: unless-stopped healthcheck: test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"] interval: 5s timeout: 3s retries: 20 start_period: 10s networks: - suitecoffee-net suitecoffee-tenants: image: postgres:16 container_name: suitecoffee-tenants environment: POSTGRES_DB: ${TENANTS_DB_NAME} POSTGRES_USER: ${TENANTS_DB_USER} POSTGRES_PASSWORD: ${TENANTS_DB_PASS} volumes: - tenants-data:/var/lib/postgresql/data restart: unless-stopped healthcheck: test: ["CMD-SHELL", "pg_isready -U ${TENANTS_DB_USER} -d ${TENANTS_DB_NAME}"] interval: 5s timeout: 3s retries: 20 start_period: 10s networks: - suitecoffee-net volumes: tenants-data: suitecoffee-data: networks: suitecoffee-net: driver: bridge