services:
# Multiple app instances
app-1:
build:
context: .
target: production-main
dockerfile: Dockerfile
ports:
- "3003:3000" # Expose to host for nginx
env_file:
- website/.env
environment:
- INSTANCE_NAME=app-1
depends_on:
- websocket
restart: unless-stopped
networks:
- shared_backend
app-2:
- "3004:3000" # Different port for second instance
- INSTANCE_NAME=app-2
app-3:
- "3005:3000" # Different port for third instance
- INSTANCE_NAME=app-3
# WebSocket service (single instance is usually sufficient)
websocket:
target: production-websocket
- "8082:8080"
shared_backend:
external: true