-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-dev.yaml
232 lines (220 loc) · 5.69 KB
/
docker-compose-dev.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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
version: '3'
services:
rabbit:
image: rabbitmq:3.12.4-management
container_name: rabbit
ports:
- "5672:5672"
- "15672:15672"
healthcheck:
test: [ "CMD", "rabbitmqctl", "status" ]
interval: 10s
timeout: 10s
retries: 3
start_period: 30s
restart: always
db:
image: mongo:7.0.0
container_name: db
ports:
- "27017:27017"
restart: always
# Service for loading database fixtures.
db-fixture-rest-api:
image: db-fixture-rest-api
build:
context: ./services/db-fixture-rest-api
dockerfile: Dockerfile
container_name: db-fixture-rest-api
volumes:
- ./services/db-fixture-rest-api/fixtures:/usr/src/app/fixtures:z
ports:
- "9000:80"
environment:
- PORT=80
- DBHOST=mongodb://db:27017
- FIXTURES_DIR=fixtures
depends_on:
db:
condition: service_started
restart: always
gateway:
image: gateway
build:
context: ./services/gateway
dockerfile: Dockerfile-dev
container_name: gateway
volumes:
- /tmp/gateway/npm-cache:/root/.npm:z
- ./services/gateway/src:/usr/src/app/src:z
- ./services/gateway/public:/usr/src/app/public:z
ports:
- "4000:80"
environment:
- PORT=80
- NODE_ENV=development
depends_on:
- history
- metadata
- video-streaming
- video-uploader
restart: "no"
#
# Uncomment this service to enable cloud storage.
#
# videos-storage:
# image: videos-storage
# build:
# context: ./services/videos-storage
# dockerfile: Dockerfile-dev
# container_name: videos-storage
# volumes:
# - /tmp/videos-storage/npm-cache:/root/.npm:z
# - ./services/videos-storage/src:/usr/src/app/src:z
# ports:
# - "4001:80"
# environment:
# - PORT=80
# - STORAGE_BUCKET_NAME=${STORAGE_BUCKET_NAME}
# - STORAGE_REGION_NAME=${STORAGE_REGION_NAME}
# - STORAGE_ACCESS_KEY_ID=${STORAGE_ACCESS_KEY_ID}
# - STORAGE_SECRET_ACCESS_KEY=${STORAGE_SECRET_ACCESS_KEY}
# - NODE_ENV=development
# restart: "no"
#
# This is the local version of storage.
# Instead of storing files in the cloud it stores files on the
# local machine.
#
# This is "mock" for the storage microservices to make
# local testing easier.
#
videos-storage:
image: mock-storage
build:
context: ./services/mock-storage
dockerfile: Dockerfile
container_name: videos-storage
volumes:
- /tmp/mock-storage/npm-cache:/root/.npm:z
- ./services/mock-storage/src:/usr/src/app/src:z
- ./services/mock-storage/storage:/usr/src/app/storage:z
ports:
- "4001:80"
environment:
- PORT=80
- NODE_ENV=development
restart: "no"
history:
image: history
build:
context: ./services/history
dockerfile: Dockerfile-dev
container_name: history
volumes:
- /tmp/history/npm-cache:/root/.npm:z
- ./services/history/src:/usr/src/app/src:z
ports:
- "4002:80"
environment:
- PORT=80
- RABBIT=amqp://guest:guest@rabbit:5672
- DBHOST=mongodb://db:27017
- DBNAME=history
- NODE_ENV=development
depends_on:
db:
condition: service_started
rabbit:
condition: service_healthy
restart: "no"
recommendations:
image: recommendations
build:
context: ./services/recommendations
dockerfile: Dockerfile-dev
container_name: recommendations
volumes:
- /tmp/recommendations/npm-cache:/root/.npm:z
- ./services/recommendations/src:/usr/src/app/src:z
ports:
- "4003:80"
environment:
- PORT=80
- RABBIT=amqp://guest:guest@rabbit:5672
- DBHOST=mongodb://db:27017
- DBNAME=recommendations
- NODE_ENV=development
depends_on:
db:
condition: service_started
rabbit:
condition: service_healthy
restart: "no"
metadata:
image: metadata
build:
context: ./services/metadata
dockerfile: Dockerfile-dev
container_name: metadata
volumes:
- /tmp/metadata/npm-cache:/root/.npm:z
- ./services/metadata/src:/usr/src/app/src:z
ports:
- "4004:80"
environment:
- PORT=80
- RABBIT=amqp://guest:guest@rabbit:5672
- DBHOST=mongodb://db:27017
- DBNAME=metadata
- NODE_ENV=development
depends_on:
db:
condition: service_started
rabbit:
condition: service_healthy
restart: "no"
video-uploader:
image: video-uploader
build:
context: ./services/video-uploader
dockerfile: Dockerfile-dev
container_name: video-uploader
volumes:
- /tmp/video-uploader/npm-cache:/root/.npm:z
- ./services/video-uploader/src:/usr/src/app/src:z
- ./services/video-uploader/uploads:/usr/src/app/uploads:z
ports:
- "4005:80"
environment:
- PORT=80
- RABBIT=amqp://guest:guest@rabbit:5672
- NODE_ENV=development
depends_on:
rabbit:
condition: service_healthy
videos-storage:
condition: service_started
restart: "no"
video-streaming:
image: video-streaming
build:
context: ./services/video-streaming
dockerfile: Dockerfile-dev
container_name: video-streaming
volumes:
- /tmp/video-streaming/npm-cache:/root/.npm:z
- ./services/video-streaming/src:/usr/src/app/src:z
- ./services/video-streaming/videos:/usr/src/app/videos:z
ports:
- "4006:80"
environment:
- PORT=80
- RABBIT=amqp://guest:guest@rabbit:5672
- NODE_ENV=development
depends_on:
rabbit:
condition: service_healthy
videos-storage:
condition: service_started
restart: "no"