forked from CS3219-AY2223S1/cs3219-project-ay2223s1-g58
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.local.yml
134 lines (126 loc) · 2.96 KB
/
docker-compose.local.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
version: '3.3'
services:
mongo:
image: mongo
ports:
- '27017:27017'
redis:
image: redis:alpine
ports:
- '6379:6379'
user-service:
build:
context: ./user-service
ports:
- '8000:8000'
links:
- mongo
- redis
depends_on:
- mongo
- redis
env_file:
- .env.local
matching-service:
build:
context: ./matching-service
ports:
- '8001:8001'
depends_on:
postgres_db:
condition: service_healthy
links:
- postgres_db
environment:
- URI_HISTORY_SERVICE=http://history-service:8080
- URI_ROOM_SERVICE=http://room-service:8022
- URI_QUESTION_SERVICE=http://question-service:8500
- ACCESS_TOKEN_SECRET=7c0dd92cafc2537595f48eca543a45e38e25b0322c558b8cb44907db49726b54a0809709c4491cbc086187009367ac4febfb8d5db310320c16d510818d833ad9
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres_db
- POSTGRES_USER=postgres
- POSTGRES_HOST=postgres_db
- POSTGRES_PORT=5432
- ENV=production
- REDIS_HOST=redis
room-service:
build:
context: ./room-service
ports:
- '8022:8022'
depends_on:
postgres_db:
condition: service_healthy
links:
- postgres_db
environment:
- URI_QUESTION_SERVICE=http://question-service:8500
- ACCESS_TOKEN_SECRET=7c0dd92cafc2537595f48eca543a45e38e25b0322c558b8cb44907db49726b54a0809709c4491cbc086187009367ac4febfb8d5db310320c16d510818d833ad9
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres_db
- POSTGRES_USER=postgres
- POSTGRES_HOST=postgres_db
- POSTGRES_PORT=5432
- ENV=production
- REDIS_HOST=redis
peerjs-server:
image: peerjs/peerjs-server
ports:
- '9000:9000'
postgres_db:
image: postgres:latest
restart: always
ports:
- '5432:5432'
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres_db
POSTGRES_USER: postgres
POSTGRES_HOST: postgres_db
POSTGRES_PORT: 5432
healthcheck:
test: ['CMD', 'pg_isready', '-q', '-d', 'postgres_db', '-U', 'postgres']
interval: 5s
timeout: 5s
retries: 5
question-service:
build:
context: ./question-service
ports:
- '8500:8500'
depends_on:
postgres_db:
condition: service_healthy
env_file:
- .env.local
links:
- postgres_db
restart: on-failure
history-service:
build:
context: ./history-service
ports:
- '8080:8080'
links:
- mongo
depends_on:
- mongo
env_file:
- .env.local
environment:
- URI_QUESTION_SERVICE=http://question-service:8500
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- '80:80'
volumes:
- /app/node_modules
- ./frontend:/app
depends_on:
- user-service
- matching-service
- question-service
- history-service
- room-service