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

70 lines
1.4 KiB
YAML
Raw Normal View History

2025-05-30 12:24:21 +03:00
services:
2025-06-23 22:37:39 +03:00
# Multiple app instances
app-1:
2025-05-30 12:24:21 +03:00
build:
context: .
target: production-main
dockerfile: Dockerfile
ports:
2025-06-23 22:37:39 +03:00
- "3003:3000" # Expose to host for nginx
2025-05-30 12:24:21 +03:00
env_file:
- website/.env
2025-06-23 22:37:39 +03:00
environment:
- INSTANCE_NAME=app-1
2025-05-30 12:24:21 +03:00
depends_on:
- websocket
restart: unless-stopped
2025-06-23 22:37:39 +03:00
networks:
- shared_backend
2025-05-30 12:24:21 +03:00
2025-06-23 22:37:39 +03:00
app-2:
2025-05-30 12:24:21 +03:00
build:
context: .
2025-06-23 22:37:39 +03:00
target: production-main
2025-05-30 12:24:21 +03:00
dockerfile: Dockerfile
ports:
2025-06-23 22:37:39 +03:00
- "3004:3000" # Different port for second instance
2025-05-30 12:24:21 +03:00
env_file:
- website/.env
2025-06-23 22:37:39 +03:00
environment:
- INSTANCE_NAME=app-2
2025-05-30 12:24:21 +03:00
depends_on:
2025-06-23 22:37:39 +03:00
- websocket
2025-05-30 12:24:21 +03:00
restart: unless-stopped
2025-06-23 22:37:39 +03:00
networks:
- shared_backend
2025-05-30 12:24:21 +03:00
2025-06-23 22:37:39 +03:00
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
2025-05-30 12:24:21 +03:00
restart: unless-stopped
2025-06-23 22:37:39 +03:00
networks:
- shared_backend
2025-05-30 12:24:21 +03:00
2025-06-23 22:37:39 +03:00
# WebSocket service (single instance is usually sufficient)
websocket:
build:
context: .
target: production-websocket
dockerfile: Dockerfile
2025-05-30 12:24:21 +03:00
ports:
2025-06-23 22:37:39 +03:00
- "8082:8080"
env_file:
- website/.env
2025-05-30 12:24:21 +03:00
restart: unless-stopped
2025-06-23 22:37:39 +03:00
networks:
- shared_backend
2025-05-30 12:24:21 +03:00
2025-06-23 22:37:39 +03:00
networks:
shared_backend:
external: true