This repository has been archived on 2025-08-19. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
coinstorge/docker-compose.yml
2025-06-23 22:37:39 +03:00

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