-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
84 lines (84 loc) · 2.27 KB
/
docker-compose.yml
File metadata and controls
84 lines (84 loc) · 2.27 KB
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
version: '2'
services :
rabbit:
hostname: rabbit
image: rabbitmq:latest
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=mypass
ports:
- "5672:5672"
users:
build: ./users-service
container_name: users-service
environment:
- MONGO_HOST=mongo
links:
- mongo
depends_on:
- mongo
expose:
- "4001"
command: ["./app/wait-for-it.sh", "mongo:27017","--timeout=30", "--", "node", "./app/dist/server.js"]
courses:
build: ./course-service
container_name: courses-service
environment:
- MONGO_HOST=mongo
links:
- mongo
depends_on:
- mongo
expose:
- "4002"
command: ["./courses/wait-for-it.sh", "mongo:27017","--timeout=30", "--", "node", "./courses/dist/server.js"]
gateway:
build: ./api-gateway
container_name: gateway-service
environment:
- COURSES=courses:4002
- USERS=users:4001
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=mypass
- RABBIT=rabbit
links:
- courses
- users
- rabbit
depends_on:
- rabbit
ports:
- "3000:3000"
command: ["./gateway/wait-for-it.sh", "rabbit:5672","--timeout=30", "--", "node", "./gateway/dist/server.js"]
email:
build: ./email-service
container_name: email-service
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=mypass
- RABBIT=rabbit
links:
- rabbit
depends_on:
- rabbit
ports:
- "4003:4003"
command: ["./email/wait-for-it.sh", "rabbit:5672","--timeout=30", "--", "node", "./email/dist/server.js"]
frontend:
build: ./frontend
container_name: frontend
environment:
- PORT=3030
links:
- rabbit
ports:
- "3030:3030"
- "3031:3031"
command: ["./frontend/wait-for-it.sh","rabbit:5672", "--timeout=30", "--","npm", "start", "--prefix", "./frontend"]
mongo:
container_name: mongo
image: mongo
volumes:
- ./data:/data/db
expose:
- "27017"