-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
97 lines (97 loc) · 2.26 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
version: '3.8'
services:
nginx:
build:
context: .
dockerfile: ./docker/nginx.Dockerfile
image: cc-nginx
depends_on:
- frontend
- user-svc
- matching-svc
- collaboration-svc
- history-svc
- question-svc
- communication-svc
ports:
- 80:80
mongodb:
image: mongo
restart: unless-stopped
container_name: mongodb
environment:
- MONGO_INITDB_ROOT_USERNAME=mongo
- MONGO_INITDB_ROOT_PASSWORD=mongopwd
ports:
- 27017:27017
frontend:
build:
context: .
dockerfile: ./docker/frontend.Dockerfile
image: cc-frontend
ports:
- 3000:3000
user-svc:
build:
context: .
dockerfile: ./docker/user.Dockerfile
image: cc-user
environment:
- USER_SVC_DB_URI=mongodb://mongo:mongopwd@mongodb:27017/cocoder?authSource=admin
- URI_HISTORY_SVC=http://history-svc:8003
- ACCESS_TOKEN_SECRET=jwt-secret
- ACCESS_TOKEN_EXPIRES_IN=1d
ports:
- 8000:8000
matching-svc:
build:
context: .
dockerfile: ./docker/matching.Dockerfile
image: cc-matching
depends_on:
- redis-matching
environment:
- REDIS_URL=redis://redis-matching:6379
- URI_COLLAB_SVC=http://collaboration-svc:8002
ports:
- 8001:8001
collaboration-svc:
build:
context: .
dockerfile: ./docker/collaboration.Dockerfile
image: cc-collaboration
depends_on:
- redis-collab
environment:
- REDIS_URL=redis://redis-collab:6379
- URI_QUESTION_SVC=http://question-svc:8004
- URI_HISTORY_SVC=http://history-svc:8003
ports:
- 8002:8002
history-svc:
build:
context: .
dockerfile: ./docker/history.Dockerfile
image: cc-history
environment:
- HISTORY_SVC_DB_URI=mongodb://mongo:mongopwd@mongodb:27017/cocoder?authSource=admin
ports:
- 8003:8003
question-svc:
build:
context: .
dockerfile: ./docker/question.Dockerfile
image: cc-question
ports:
- 8004:8004
communication-svc:
build:
context: .
dockerfile: ./docker/communication.Dockerfile
image: cc-communication
ports:
- 8005:8005
redis-matching:
image: 'redis:alpine'
redis-collab:
image: 'redis:alpine'