70 lines
No EOL
1.4 KiB
YAML
70 lines
No EOL
1.4 KiB
YAML
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:
|
|
build:
|
|
context: .
|
|
target: production-main
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "3004:3000" # Different port for second instance
|
|
env_file:
|
|
- website/.env
|
|
environment:
|
|
- INSTANCE_NAME=app-2
|
|
depends_on:
|
|
- websocket
|
|
restart: unless-stopped
|
|
networks:
|
|
- shared_backend
|
|
|
|
app-3:
|
|
build:
|
|
context: .
|
|
target: production-main
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "3005:3000" # Different port for third instance
|
|
env_file:
|
|
- website/.env
|
|
environment:
|
|
- INSTANCE_NAME=app-3
|
|
depends_on:
|
|
- websocket
|
|
restart: unless-stopped
|
|
networks:
|
|
- shared_backend
|
|
|
|
# WebSocket service (single instance is usually sufficient)
|
|
websocket:
|
|
build:
|
|
context: .
|
|
target: production-websocket
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "8082:8080"
|
|
env_file:
|
|
- website/.env
|
|
restart: unless-stopped
|
|
networks:
|
|
- shared_backend
|
|
|
|
networks:
|
|
shared_backend:
|
|
external: true |