-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
106 lines (98 loc) · 3.36 KB
/
docker-compose.yml
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
version: '3.8'
services:
rabbitmq:
image: rabbitmq:3-management # RabbitMQ image with management UI
container_name: rabbitmq
ports:
- "5672:5672" # RabbitMQ server port
- "15672:15672" # RabbitMQ management UI port
environment:
RABBITMQ_DEFAULT_USER: guest # Default username
RABBITMQ_DEFAULT_PASS: guest # Default password
healthcheck:
test: ["CMD", "rabbitmqctl", "status"]
interval: 10s
timeout: 5s
retries: 5
question-service:
build: ./question-service
image: question-service:latest
ports:
- "8080:8080" # Expose question service on port 8080
volumes:
- ./question-service:/usr/src/app/question-service # For local development with live reloading
- /usr/src/app/question-service/node_modules # Named volume for node_modules
environment:
- NODE_ENV=development # Set environment to development
depends_on:
rabbitmq:
condition: service_healthy # Wait until RabbitMQ is healthy
user-service:
build: ./user-service
image: user-service:latest
ports:
- "8081:8081" # Expose user service on port 8081
volumes:
- ./user-service:/usr/src/app/user-service # For local development with live reloading
- /usr/src/app/user-service/node_modules # Named volume for node_modules
environment:
- NODE_ENV=development # Set environment to development
depends_on:
rabbitmq:
condition: service_healthy # Wait until RabbitMQ is healthy
matching-service:
build: ./matching-service
image: matching-service:latest
ports:
- "8082:8082" # Expose matching service on port 8082
volumes:
- ./matching-service:/usr/src/app/matching-service # For local development with live reloading
- /usr/src/app/matching-service/node_modules # Named volume for node_modules
environment:
- NODE_ENV=development # Set environment to development
depends_on:
rabbitmq:
condition: service_healthy # Wait until RabbitMQ is healthy
collaboration-service:
build: ./collaboration-service
image: collaboration-service:latest
ports:
- "4444:4444"
volumes:
- ./collaboration-service:/usr/src/app/collaboration-service
- /usr/src/app/collaboration-service/node_modules
environment:
- NODE_ENV=development
depends_on:
rabbitmq:
condition: service_healthy
sandbox-service:
build: ./sandbox-service
image: sandbox-service:latest
ports:
- "8084:8084"
volumes:
- ./sandbox-service:/usr/src/app/sandbox-service
- /usr/src/app/sandbox-service/node_modules
environment:
- NODE_ENV=development # Set environment to development
depends_on:
rabbitmq:
condition: service_healthy # Wait until RabbitMQ is healthy
frontend:
build: ./frontend
image: frontend:latest
ports:
- "3000:3000" # Expose frontend on port 3000
environment:
- NODE_ENV=development
depends_on:
- question-service
- user-service
- matching-service
- collaboration-service
- rabbitmq
# volumes:
# question_service_node_modules:
# user_service_node_modules:
# matching_service_node_modules: