-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
249 lines (232 loc) · 5.61 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
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
version: "3"
services:
db:
image: mongo:latest
volumes:
- database-storage:/run/db
ports:
- 27017:27017
logging:
driver: "none"
learning_object_metadata_schema:
image: learning_object_metadata_schema
build: ./learning_object/metadata_schema
command: gunicorn -b 0.0.0.0:80 app:api --reload
ports:
- 80
env_file:
- .env
environment:
VIRTUAL_HOST: "*/v1/learning-object-metadata-schema, */v1/learning-object-metadata-schema/*"
VIRTUAL_HOST_WEIGHT: 10
links:
- db
volumes:
- ./learning_object/metadata_schema:/code
depends_on:
- db
learning_object_default_files:
image: learning_object_default_files
build:
context: ./learning_object/default_files
dockerfile: Dockerfile
env_file:
- .env
volumes:
- file-storage:/run/files
logging:
driver: "none"
learning_object_collection:
image: learning_object_collection
build: ./learning_object/collection
command: gunicorn -b 0.0.0.0:80 app:api --reload
ports:
- 80
env_file:
- .env
environment:
VIRTUAL_HOST: "*/v1/learning-object-collection, */v1/learning-object-collection/*, */v1/oai, */v1/oai*"
VIRTUAL_HOST_WEIGHT: 10
FILE_STORAGE: /run/files
links:
- db
volumes:
- file-storage:/run/files
- ./learning_object/collection:/code
depends_on:
- learning_object_metadata_schema
lo_collections:
image: lo_collections
build: ./learning_object/collections
command: gunicorn -b 0.0.0.0:80 app:api --reload
ports:
- 80
env_file:
- .env
environment:
VIRTUAL_HOST: "*/v1/collection, */v1/collection/*, */v1/subcollection, */v1/subcollection/*"
VIRTUAL_HOST_WEIGHT: 10
FILE_STORAGE: /run/files
links:
- db
volumes:
- file-storage:/run/files
- ./learning_object/collections:/code
depends_on:
- learning_object_collection
learning_object_file_renderer:
image: nginx
volumes:
- file-storage:/usr/share/nginx/html/learning-object-file-renderer:ro
ports:
- 80
env_file:
- .env
environment:
VIRTUAL_HOST: "*/learning-object-file-renderer/*"
VIRTUAL_HOST_WEIGHT: 10
logging:
driver: "none"
user_collection:
image: user_collection
build: ./user/collection
command: gunicorn -b 0.0.0.0:80 app:api --reload
ports:
- 80
env_file:
- .env
environment:
VIRTUAL_HOST: "*/v1/user-collection, */v1/user-collection/*"
VIRTUAL_HOST_WEIGHT: 10
DB_HOST: db
links:
- db
volumes:
- ./user/collection:/code
depends_on:
- db
user_login:
image: user_login
build: ./user/login
command: gunicorn -b 0.0.0.0:80 app:api --reload
ports:
- 80
env_file:
- .env
environment:
VIRTUAL_HOST: "*/v1/user-login, */v1/user-login/*"
VIRTUAL_HOST_WEIGHT: 10
DB_HOST: db
links:
- db
volumes:
- ./user/login:/code
depends_on:
- db
user_account_validation:
image: user_account_validation
build: ./user/account_validation
command: gunicorn -b 0.0.0.0:80 app:api --reload
ports:
- 80
env_file:
- .env
environment:
VIRTUAL_HOST: "*/v1/user-account, */v1/user-account/*"
VIRTUAL_HOST_WEIGHT: 10
DB_HOST: db
links:
- db
volumes:
- ./user/account_validation:/code
depends_on:
- db
- redis
user_recover_password:
image: user_recover_password
build: ./user/recover_password
command: gunicorn -b 0.0.0.0:80 app:api --reload
ports:
- 80
env_file:
- .env
environment:
VIRTUAL_HOST: "*/v1/recover-password, */v1/recover-password/*"
VIRTUAL_HOST_WEIGHT: 10
DB_HOST: db
links:
- db
volumes:
- ./user/recover_password:/code
depends_on:
- db
- redis
worker_account_validation:
image: user_account_validation
build: ./user/account_validation
command: rq worker account_validation -u redis://redis
env_file:
- .env
environment:
VIRTUAL_HOST: "*/v1/task-account-validation, */v1/task-account-validation/*"
depends_on:
- db
- redis
worker_new_user_admin_notification:
image: user_account_validation
build: ./user/account_validation
command: rq worker new_user_admin_notification -u redis://redis
env_file:
- .env
environment:
VIRTUAL_HOST: "*/v1/task-new-user-admin-notification, */v1/task-new-user-admin-notification/*"
depends_on:
- db
- redis
worker_recover_password:
image: user_recover_password
build: ./user/recover_password
command: rq worker recover_password -u redis://redis
env_file:
- .env
environment:
VIRTUAL_HOST: "*/v1/task-recover-password, */v1/task-recover-password/*"
depends_on:
- db
- redis
redis:
image: redis:alpine
volumes:
- queue-storage:/data
ui:
image: ui
build: ./ui
ports:
- 80
environment:
VIRTUAL_HOST: "*/*"
VIRTUAL_HOST_WEIGHT: 0
lb:
image: dockercloud/haproxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- '8081:80'
- '1936:1936'
links:
- db
- learning_object_metadata_schema
- learning_object_collection
- lo_collections
- learning_object_file_renderer
- user_collection
- user_login
- user_account_validation
- user_recover_password
- ui
logging:
driver: "none"
volumes:
file-storage:
database-storage:
queue-storage: