-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.prod.yml
230 lines (220 loc) · 6.85 KB
/
docker-compose.prod.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
version: "3.7"
networks:
bridge:
driver: bridge
volumes:
mongo_db:
name: mongo_db
driver: local
driver_opts:
device: 'D:\Docker\data\db'
o: 'bind'
type: 'none'
mongo_configdb:
name: mongo_configdb
driver: local
driver_opts:
device: 'D:\Docker\data\configdb'
o: 'bind'
type: 'none'
elasticsearch_data:
name: elasticsearch_data
driver: local
driver_opts:
device: 'D:\Docker\elasticsearch\data'
o: 'bind'
type: 'none'
graylog_journal:
name: graylog_journal
driver: local
driver_opts:
device: 'D:\Docker\graylog\journal'
o: 'bind'
type: 'none'
graylog_config:
name: graylog_config
driver: local
driver_opts:
device: 'D:\Docker\graylog\config'
o: 'bind'
type: 'none'
exchange_service_logs:
name: exchange_service_logs
driver: local
driver_opts:
device: 'D:\Docker\exchange\service\logs'
o: 'bind'
type: 'none'
exchange_service_config:
name: exchange_service_config
driver: local
driver_opts:
device: 'D:\Docker\exchange\service\config'
o: 'bind'
type: 'none'
exchange_service_indicators:
name: exchange_service_indicators
driver: local
driver_opts:
device: 'D:\Docker\exchange\service\indicators'
o: 'bind'
type: 'none'
services:
nginx.reverse.proxy:
image: nginx:latest
container_name: nginx.reverse.proxy
volumes:
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:rw
ports:
- 80:80
networks:
bridge:
# mongo Database
mongodb:
image: mongo:${MONGO_DB_VERSION}
restart: always
container_name: mongodb
hostname: mongodb
# List directories to mount
volumes:
- mongo_db:/data/db:rw
- mongo_configdb:/data/configdb:rw
- ./docker/mongodb/init.sh:/init.sh:rw
- ./docker/mongodb/mongo-users-init.js:/docker-entrypoint-initdb.d/mongo-users-init.js:rw
command: [
"./init.sh"
]
ports:
- 27017:27017
- 27018:27018
- 27019:27019
networks:
bridge:
# Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/6.6/docker.html
elasticsearch:
container_name: elasticsearch
hostname: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.6.1
#data folder in share for persistence
volumes:
- elasticsearch_data:/usr/share/elasticsearch/data
environment:
- http.host=0.0.0.0
- transport.host=localhost
- network.host=0.0.0.0
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 1g
ports:
- 9200:9200
- 9300:9300
networks:
bridge:
# Graylog: https://hub.docker.com/r/graylog/graylog/
graylog:
container_name: graylog
hostname: graylog
restart: always
image: graylog/graylog:3.3.8-1
#journal and config directories in local NFS share for persistence
volumes:
- graylog_journal:/usr/share/graylog/data/journal
- graylog_config:/usr/share/graylog/data/config
environment:
- GRAYLOG_HTTP_BIND_ADDRESS=${GRAYLOG_HTTP_BIND_ADDRESS}
# CHANGE ME (must be at least 16 characters)!
- GRAYLOG_PASSWORD_SECRET=${GRAYLOG_PASSWORD_SECRET}
# Password: admin
- GRAYLOG_ROOT_PASSWORD_SHA2=${GRAYLOG_ROOT_PASSWORD_SHA2}
- GRAYLOG_HTTP_EXTERNAL_URI=${GRAYLOG_HTTP_EXTERNAL_URI}
- GRAYLOG_MONGODB_URI=${GRAYLOG_MONGODB_URI}
- GRAYLOG_ELASTICSEARCH_HOSTS=${GRAYLOG_ELASTICSEARCH_HOSTS}
- GRAYLOG_ROOT_TIMEZONE=${GRAYLOG_ROOT_TIMEZONE}
ports:
# Graylog web interface and REST API
- 7555:7555
# Syslog TCP
- 8514:8514
# Syslog UDP
- 8514:8514/udp
# GELF TCP
- 12201:12201
# GELF UDP
- 12201:12201/udp
networks:
bridge:
#main exchange service
backend:
container_name: backend
hostname: backend
build:
context: .
dockerfile: ./docker/exchange.service/Dockerfile
volumes:
- exchange_service_logs:/exchange/service/logs:rw
- exchange_service_indicators:/exchange/service/indicators:z
- exchange_service_config:/exchange/service/config:rw
ports:
- 5000:5000
- 5001:5001
command: dotnet exchange.service.dll
environment:
- ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT}
networks:
bridge:
# frontend
frontend:
container_name: frontend
hostname: frontend
env_file:
- .env
build:
context: .
dockerfile: ./docker/signalr.webpack.server.frontend/Dockerfile
ports:
- 9000:9000
command: npm run start:docker
networks:
bridge:
#celerycontainer_name: celery
celery:
container_name: celery
hostname: celery
env_file:
- .env
# All files and folders in the currect directory
build:
context: .
dockerfile: ./docker/service.machine.learning/Dockerfile
# List directories to mount
command: celery -A app.tasks.task_work:celery worker --loglevel=info -P eventlet
networks:
bridge:
#machine learning web application
machinelearning:
container_name: machinelearning
hostname: machinelearning
build:
context: .
dockerfile: ./docker/service.machine.learning/Dockerfile
# Application will run on port 5005
# Access to directory has to be shared
ports:
- 5005:5005
command: "bash -c 'chmod 777 data && ls -l && ls && python3.8 main.py'"
volumes:
- exchange_service_indicators:/usr/src/app/static
env_file:
- .env
environment:
- MI_HOST=${MI_HOST}
- MI_PORT=${MI_PORT}
- MI_GRAYLOG_HOST=${MI_GRAYLOG_HOST}
- MI_GRAYLOG_PORT=${MI_GRAYLOG_PORT}
- MI_BROKER_URL=${MI_BROKER_URL}
- MI_RESULT_BACKEND=${MI_RESULT_BACKEND}
networks:
bridge: