-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
237 lines (236 loc) · 6.62 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
version: '3'
services:
mongo:
image: 'mongo:4.4'
restart: always
container_name: mongo
environment:
- MONGO_INITDB_ROOT_USERNAME=${MM_MONGO_USER}
- MONGO_INITDB_ROOT_PASSWORD=${MM_MONGO_PWD}
- MONGO_DEVS=${MONGO_DEVS}
- MONGO_DEV_PWD=${MONGO_DEV_PWD}
- MONGO_PORT=${MONGO_PORT}
- MM_DB=${MM_DB}
ports:
- '27017:27017'
volumes:
- ./mockDB/db:/data/db
- ./mockDB/restore:/restore
- ./mockDB/log:/var/log/mongodb
- ./mockDB/mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh
es:
image: 'docker.elastic.co/elasticsearch/elasticsearch:7.17.1'
container_name: es
restart: always
environment:
- node.name=es
- bootstrap.memory_lock=true
- cluster.initial_master_nodes=es
- 'ES_JAVA_OPTS=-Xms512m -Xmx512m'
- xpack.security.enabled=false
ulimits:
memlock:
soft: -1
hard: -1
ports:
- '9200:9200'
volumes:
- ./mockDB/es:/usr/share/elasticsearch/data
minio:
container_name: minio
image: minio/minio
command: server --console-address ":9001" /data
environment:
- MINIO_ROOT_USER=${MINIO_ROOT_USER}
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
ports:
- '9000:9000'
- '9001:9001'
volumes:
- ./mockDB/minio:/data
proxy:
container_name: proxy
depends_on:
- api
- client
restart: always
build:
dockerfile: Dockerfile.dev
context: ./nginx
ports:
- '80:80'
api:
depends_on:
- es
- mongo
- minio
container_name: restful
restart: always
build:
dockerfile: Dockerfile.dev
context: ./resfulservice
volumes:
- /app/node_modules
- ./resfulservice:/app
environment:
- DB_USERNAME=${MONGO_DEVS}
- DB_PASSWORD=${MONGO_DEV_PWD}
- MM_DB=${MM_DB}
- MONGO_ADDRESS=${MONGO_ADDRESS}
- MONGO_PORT=${MONGO_PORT}
- TKNS=${TKNS}
- FILES_DIRECTORY=${FILES_DIRECTORY}
- ESADDRESS=${ESADDRESS}
- PORT=${PORT}
- WORKER_PORT=${WORKER_PORT}
- MINIO_PORT=${MINIO_PORT}
- MINIO_CONSOLE_PORT=${MINIO_CONSOLE_PORT}
- MINIO_BUCKET=${MINIO_BUCKET}
- MINIO_ROOT_USER=${MINIO_ROOT_USER}
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
- ROUTER=${HOST_PORT}
- MM_RUNTIME_ENV=${MM_RUNTIME_ENV}
- MM_USER=${MM_USER}
- MM_USER_EMAIL=${MM_USER_EMAIL}
- MM_AUTH_GIVEN_NAME_HEADER=${MM_AUTH_GIVEN_NAME_HEADER}
- MM_AUTH_DISPLAYNAME_HEADER=${MM_AUTH_DISPLAYNAME_HEADER}
- MM_AUTH_SURNAME_HEADER=${MM_AUTH_SURNAME_HEADER}
- MM_AUTH_EMAIL_HEADER=${MM_AUTH_EMAIL_HEADER}
- MM_AUTH_USER_HEADER=${MM_AUTH_USER_HEADER}
- KNOWLEDGE_ADDRESS=${KNOWLEDGE_ADDRESS}
- MAIL_SERVER_HOST=${MAIL_SERVER_HOST}
- MAIL_SERVER_PORT=${MAIL_SERVER_PORT}
- MAIL_USER_ADDRESS=${MAIL_USER_ADDRESS}
- MAIL_USER_PASSWORD=${MAIL_USER_PASSWORD}
- TERM_OF_SERVICE=${TERM_OF_SERVICE}
- SWAGGER_CONTACT_NAME=${SWAGGER_CONTACT_NAME}
- SWAGGER_CONTACT_EMAIL=${SWAGGER_CONTACT_EMAIL}
- DEV_ENDPOINT=${DEV_ENDPOINT}
- QA_SERVER_ENDPOINT=${QA_SERVER_ENDPOINT}
- PROD_SERVER_ENDPOINT=${PROD_SERVER_ENDPOINT}
- MANAGED_SERVICE_ADDRESS=${MANAGED_SERVICE_ADDRESS}
- SYSTEM_EMAIL=${SYSTEM_EMAIL}
- DEPLOYMENT_ADDRESS=${DEPLOYMENT_ADDRESS}
- DOCKER_HUB_ADDRESS=${DOCKER_HUB_ADDRESS}
- DEPLOYMENT_SECRET=${DEPLOYMENT_SECRET}
- DYNAMFIT_TEST_FILE=${DYNAMFIT_TEST_FILE}
ports:
- '3001:3001'
- '3002:3002'
client:
stdin_open: true
container_name: frontend
environment:
- CHOKIDAR_USEPOLLING=true
- API_PORT=${PORT}
- MINIO_PORT=${MINIO_PORT}
- SERVICE_PORT=${HOST_PORT}
build:
dockerfile: Dockerfile.dev
context: ./app
volumes:
- /app/node_modules
- ./app:/app
managedservices:
container_name: managedservices
# depends_on:
# - mongo
restart: always
build:
dockerfile: Dockerfile
context: ./services
ports:
- '5050:5050'
volumes:
- ./services:/services
- ./resfulservice/mm_files:/usr/src/files
environment:
- MM_RUNTIME_ENV=${MM_RUNTIME_ENV}
- SECRET_KEY=${TKNS}
- FILES_WORKING_DIR=${MANAGED_SERVICES_FILES_WORKING_DIR}
- AUTH_API_TOKEN_EMAIL=${MANAGED_SERVICES_AUTH_API_TOKEN_EMAIL}
- AUTH_API_REFRESH_EMAIL=${MANAGED_SERVICES_AUTH_API_REFRESH_EMAIL}
- API_URL=${API_URL}
- GITHUB_USERNAME=${GITHUB_USERNAME}
- GITHUB_TOKEN=${GITHUB_TOKEN}
- REPO_OWNER=${REPO_OWNER}
- REPO_NAME=${REPO_NAME}
- FILE_PATH=${FILE_PATH}
- BRANCH=${BRANCH}
redis:
image: 'redis:alpine'
command: redis-server
volumes:
- ./mockDB/redis-data:/var/lib/redis
celery:
depends_on:
- redis
- fuseki
volumes:
- ./mockDB/fuseki:/app/run
- ./whyis/materialsmine:/app
command:
/opt/venv/bin/celery -A wsgi.celery worker -l INFO -c 4 --uid=nobody
--gid=nogroup
environment:
- CHOKIDAR_USEPOLLING=true
build: whyis
celerybeat:
depends_on:
- redis
- fuseki
volumes:
- ./mockDB/fuseki:/app/run
- ./whyis/materialsmine:/app
command:
/opt/venv/bin/celery -A wsgi.celery beat -l INFO --uid=nobody
--gid=nogroup
environment:
- CHOKIDAR_USEPOLLING=true
build: whyis
whyis:
container_name: whyis
depends_on:
- redis
- fuseki
stdin_open: true
command:
/opt/venv/bin/gunicorn wsgi:application --workers ${WEB_CONCURRENCY:-8}
--timeout 0 -b :8000
# entrypoint:
# /bin/sh -c "chmod +x ./whyis-init.sh && /opt/venv/bin/gunicorn
# wsgi:application --workers ${WEB_CONCURRENCY:-8} --timeout 0 -b :8000 &
# sleep 10 && ./whyis-init.sh"
environment:
- CHOKIDAR_USEPOLLING=true
- NM_GRAPH_AUTH_SECRET=${TKNS}
build: whyis
volumes:
- ./whyis/materialsmine:/app
- ./mockDB/fuseki:/app/run
- ./mockDB/whyis-init.sh:/app/whyis-init.sh
ports:
- '8000:8000'
# mem_limit: 2048m
# cpus: '0.25'
fuseki:
build: whyis
command: /opt/venv/bin/fuseki-server --mem /ds
# Needs fuseki 4.3.2 to use our full text search, stain is still at 4.0.0.
# image: 'stain/jena-fuseki:4.0.0
restart: always
# mem_limit: 9G
# mem_reservation: 9G
environment:
# - ADMIN_USER=admin
# - ADMIN_PASSWORD=${ADMIN_PASSWORD}
- JVM_ARGS=-Xmx4g
- FUSEKI_BASE=/fuseki
ports:
- '3030:3030'
volumes:
- ./mockDB/fuseki:/fuseki
mem_limit: 3072m
cpus: '0.45'
volumes:
mockDB: