-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-stack.yml
286 lines (266 loc) · 7.83 KB
/
docker-stack.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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
version: '3.2'
services:
nc_scraper_bitstamp:
build: docker/nodejs
image: dtonder/nc_nodejs
restart: on-failure
links:
- nc_rabbitmq
volumes:
- /srv/neuralcoin_deploy/current:/code
deploy:
placement:
constraints:
- node.role == manager
command: wait-for-it nc_rabbitmq:5672 -- node /code/nodejs/bitstamp-feed.js
nc_scraper_bitfinex:
build: docker/nodejs
image: dtonder/nc_nodejs
restart: on-failure
links:
- nc_rabbitmq
volumes:
- /srv/neuralcoin_deploy/current:/code
deploy:
placement:
constraints:
- node.role == manager
command: wait-for-it nc_rabbitmq:5672 -- node /code/nodejs/bitfinex-feed.js
nc_scraper_poloniex:
build: docker/nodejs
image: dtonder/nc_nodejs
restart: on-failure
links:
- nc_rabbitmq
volumes:
- /srv/neuralcoin_deploy/current:/code
deploy:
placement:
constraints:
- node.role == manager
command: wait-for-it nc_rabbitmq:5672 -- node /code/nodejs/poloniex-feed.js
nc_scraper_bittrex:
build: docker/nodejs
image: dtonder/nc_nodejs
restart: on-failure
links:
- nc_rabbitmq
volumes:
- /srv/neuralcoin_deploy/current:/code
deploy:
placement:
constraints:
- node.role == manager
command: wait-for-it nc_rabbitmq:5672 -- node /code/nodejs/bittrex-feed.js
nc_scraper_bittrex_order_book:
build: docker/nodejs
image: dtonder/nc_nodejs
restart: unless-stopped
links:
- nc_rabbitmq
volumes:
- ./:/code
command: wait-for-it nc_rabbitmq:5672 -- node /code/nodejs/bittrex-orderbook.js
nc_trades_broker:
build: docker/php
image: dtonder/nc_php
user: www-data
links:
- nc_rabbitmq
- nc_websocket_server
volumes:
- /srv/neuralcoin_deploy/current:/code
- /srv/neuralcoin_deploy/current/var/log:/code/var/logs
deploy:
placement:
constraints:
- node.role == manager
restart: on-failure
command: wait-for-it nc_rabbitmq:5672 -- wait-for-it -t 30 nc_websocket_server:8081 -- bin/env-console rabbitmq:consumer trades_listener -vvv
nc_order_book_consumer:
build: docker/php
image: dtonder/nc_php
user: www-data
links:
- nc_rabbitmq
- nc_db
volumes:
- ./:/code
- ./var/log:/code/var/logs
restart: unless-stopped
command: wait-for-it nc_rabbitmq:5672 -- wait-for-it nc_db:3306 -- bin/env-console rabbitmq:consumer order_book_listener -vvv
nc_training_status_listener:
build: docker/php
image: dtonder/nc_php
user: www-data
links:
- nc_rabbitmq
- nc_websocket_server
volumes:
- /srv/neuralcoin_deploy/current:/code
- /srv/neuralcoin_deploy/current/var/networks:/code/var/network-data
- /srv/neuralcoin_deploy/current/var/log:/code/var/logs
- /srv/neuralcoin_deploy/current/var/shared-images:/code/web/images
deploy:
placement:
constraints:
- node.role == manager
restart: on-failure
command: wait-for-it nc_rabbitmq:5672 -- bin/env-console rabbitmq:consumer training_listener -vvv
nc_training_data_assembler:
build: docker/php
image: dtonder/nc_php
user: www-data
links:
- nc_rabbitmq
- nc_websocket_server
volumes:
- /srv/neuralcoin_deploy/current:/code
- /srv/neuralcoin_deploy/current/var/networks:/code/var/network-data
- /srv/neuralcoin_deploy/current/var/log:/code/var/logs
restart: on-failure
deploy:
placement:
constraints:
- node.role == manager
command: wait-for-it nc_rabbitmq:5672 -- bin/env-console rabbitmq:consumer assemble_training_data -vvv
nc_prediction_processor:
build: docker/php
image: dtonder/nc_php
user: www-data
links:
- nc_rabbitmq
- nc_websocket_server
volumes:
- /srv/neuralcoin_deploy/current:/code
- /srv/neuralcoin_deploy/current/var/networks:/code/var/network-data
- /srv/neuralcoin_deploy/current/var/log:/code/var/logs
deploy:
placement:
constraints:
- node.role == manager
restart: on-failure
command: wait-for-it nc_rabbitmq:5672 -- bin/env-console rabbitmq:consumer request_prediction -vvv
nc_phpfpm:
build: docker/php
image: dtonder/nc_php
user: www-data
links:
- nc_rabbitmq
- nc_redis
volumes:
- composer_cache:/var/www/.composer
- /srv/neuralcoin_deploy/current:/code
- /srv/neuralcoin_deploy/current/var/networks:/code/var/network-data
- /srv/neuralcoin_deploy/current/var/log:/code/var/logs
- /srv/neuralcoin_deploy/current/var/shared-images:/code/web/images
deploy:
placement:
constraints:
- node.role == manager
command: wait-for-it nc_rabbitmq:5672 -- php-fpm
nc_websocket_server:
build: docker/php
image: dtonder/nc_php
user: www-data
links:
- nc_rabbitmq
- nc_redis
ports:
- '8081:8081'
volumes:
- /srv/neuralcoin_deploy/current:/code
- /srv/neuralcoin_deploy/current/var/networks:/code/var/network-data
- /srv/neuralcoin_deploy/current/var/log:/code/var/logs
deploy:
placement:
constraints:
- node.role == manager
restart: on-failure
command: wait-for-it nc_rabbitmq:5672 -- bin/env-console neuralcoin:websocket:server -vvv
nc_nginx:
build: docker/nginx
image: dtonder/nc_nginx
volumes:
- /srv/neuralcoin_deploy/current:/code
- /srv/neuralcoin_deploy/current/docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
environment:
- NGINX_HOST=neuralcoin.local
links:
- nc_phpfpm
- nc_websocket_server
deploy:
placement:
constraints:
- node.role == manager
ports:
- '80:80'
command: wait-for-it nc_phpfpm:9000 -- wait-for-it nc_websocket_server:8081 -- nginx
#management is on port 15672
nc_rabbitmq:
image: rabbitmq:management
deploy:
placement:
constraints:
- node.role == manager
nc_redis:
image: redis:3.2
deploy:
placement:
constraints:
- node.role == manager
nc_network_creator:
build: docker/python
image: dtonder/nc_python
user: www-data
links:
- nc_rabbitmq
volumes:
- /srv/neuralcoin_deploy/current:/code
- /srv/neuralcoin_deploy/current/var/networks:/code/var/network-data
restart: on-failure
command: wait-for-it nc_rabbitmq:5672 -- python -u python/consume-create-network.py
nc_network_trainer:
build: docker/python
image: dtonder/nc_python
user: www-data
links:
- nc_rabbitmq
volumes:
- /srv/neuralcoin_deploy/current:/code
- /srv/neuralcoin_deploy/current/var/networks:/code/var/network-data
deploy:
placement:
constraints:
- node.role != manager
restart: on-failure
command: wait-for-it nc_rabbitmq:5672 -- python -u python/consume-train-network.py
nc_get_prediction:
build: docker/python
image: dtonder/nc_python
user: www-data
restart: on-failure
links:
- nc_rabbitmq
volumes:
- /srv/neuralcoin_deploy/current:/code
- /srv/neuralcoin_deploy/current/var/networks:/code/var/network-data
command: wait-for-it nc_rabbitmq:5672 -- python -u python/consume-get-prediction.py
nc_cron:
build: docker/php
image: dtonder/nc_python
user: root
restart: on-failure
links:
- nc_rabbitmq
- nc_redis
volumes:
- /srv/neuralcoin_deploy/current:/code
- /srv/neuralcoin_deploy/current/var/networks:/code/var/network-data
- /srv/neuralcoin_deploy/current/var/log:/code/var/logs
- /srv/neuralcoin_deploy/current/docker/crontab:/etc/crontab
command: wait-for-it nc_rabbitmq:5672 -- bin/run-crons
volumes:
mysql_data:
composer_cache:
network_storage: