-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
127 lines (118 loc) · 2.67 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
version: '3.8'
services:
frontend:
build:
context: ./frontend
ports:
- "3000:3000"
env_file:
- ./frontend/.env # Load frontend environment variables
environment:
- NODE_ENV=production
- NEXT_PUBLIC_API_URL=http://nginx
depends_on:
- user-service
- question-service
- matching-service
- collaboration-service
- voice-service
networks:
- app-network
user-service:
build:
context: ./backend/user-service
ports:
- "3001:3001"
environment:
- NODE_ENV=production
networks:
- app-network
question-service:
build:
context: ./backend/question-service
ports:
- "5050:5050"
environment:
- NODE_ENV=production
networks:
- app-network
matching-service:
build:
context: ./backend/matching-service
ports:
- "3002:3002"
environment:
- NODE_ENV=production
- RABBITMQ_HOST=rabbitmq
- RABBITMQ_PORT=5672
- RABBITMQ_URL=amqp://ihate:cs3219@rabbitmq:5672/
depends_on:
rabbitmq:
condition: service_healthy
networks:
- app-network
collaboration-service:
build:
context: ./backend/collaboration-service
ports:
- "8080:8080"
- "2501:2501"
environment:
- NODE_ENV=production
depends_on:
rabbitmq:
condition: service_healthy
networks:
- app-network
voice-service:
build: ./backend/voice-service
ports:
- "8085:8085" # Exposes the backend on localhost:8085
environment:
- PORT=8085
networks:
- app-network
peer-server:
build: ./backend/peer-server
ports:
- "9000:9000" # Exposes PeerJS server on localhost:9000
networks:
- app-network
environment:
- PEER_PORT=9000
- PEER_PATH=/
- PEER_KEY=peerjs
- PEER_CONFIG_FILE=/config.json
volumes:
- ./backend/peer-server/config.json:/config.json
rabbitmq:
image: rabbitmq:3-management
ports:
- "5672:5672" # RabbitMQ port for messaging
- "15672:15672" # RabbitMQ management UI
environment:
- RABBITMQ_DEFAULT_USER=ihate
- RABBITMQ_DEFAULT_PASS=cs3219
- RABBITMQ_ERLANG_COOKIE=1234
networks:
- app-network
healthcheck:
test: ["CMD", "rabbitmqctl", "status"]
interval: 30s
timeout: 10s
retries: 5
nginx:
build:
context: ./backend/api-gateway
ports:
- "80:80"
depends_on:
- user-service
- question-service
- matching-service
- collaboration-service
networks:
- app-network
networks:
app-network:
driver: bridge