-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml.dist
248 lines (224 loc) · 5.97 KB
/
docker-compose.yml.dist
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
version: '3'
services:
#
# nodejs scraper
#
nc_scraper_bitstamp:
build: docker/nodejs
restart: unless-stopped
links:
- nc_rabbitmq
volumes:
- ./:/code
command: wait-for-it nc_rabbitmq:5672 -- node nodejs/bitstamp-feed.js
nc_scraper_bitfinex:
build: docker/nodejs
restart: unless-stopped
links:
- nc_rabbitmq
volumes:
- ./:/code
command: wait-for-it nc_rabbitmq:5672 -- node nodejs/bitfinex-feed.js
nc_scraper_poloniex:
build: docker/nodejs
restart: unless-stopped
links:
- nc_rabbitmq
volumes:
- ./:/code
command: wait-for-it nc_rabbitmq:5672 -- node nodejs/poloniex-feed.js
# nc_scraper_binance:
# build: docker/nodejs
# restart: unless-stopped
# links:
# - nc_rabbitmq
# volumes:
# - ./:/code
# command: wait-for-it nc_rabbitmq:5672 -- node nodejs/binance.js
nc_scraper_bittrex:
build: docker/nodejs
restart: unless-stopped
links:
- nc_rabbitmq
volumes:
- ./:/code
command: wait-for-it nc_rabbitmq:5672 -- node nodejs/bittrex-feed.js
nc_scraper_bittrex_order_book:
build: docker/nodejs
restart: unless-stopped
links:
- nc_rabbitmq
volumes:
- ./:/code
command: wait-for-it nc_rabbitmq:5672 -- node nodejs/bittrex-orderbook.js
#
# PHP related
#
nc_trades_broker:
build: docker/php
user: www-data
links:
- nc_rabbitmq
- nc_websocket_server
- 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 -- wait-for-it -t 30 nc_websocket_server:8081 -- bin/env-console rabbitmq:consumer trades_listener -m 50000 -vvv
nc_order_book_consumer:
build: docker/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 -m 50 -vvv
nc_training_status_listener:
build: docker/php
user: www-data
links:
- nc_rabbitmq
- nc_websocket_server
- nc_db
volumes:
- ./:/code
- ./var/networks:/code/var/network-data
- ./var/log:/code/var/logs
- ./var/shared-images:/code/web/images
restart: unless-stopped
command: wait-for-it nc_rabbitmq:5672 -- wait-for-it nc_db:3306 -- bin/env-console rabbitmq:consumer training_listener -m 10 -v
nc_training_data_assembler:
build: docker/php
user: www-data
links:
- nc_rabbitmq
- nc_websocket_server
- nc_db
volumes:
- ./:/code
- ./var/networks:/code/var/network-data
- ./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 assemble_training_data -m 10 -v
nc_prediction_processor:
build: docker/php
user: www-data
links:
- nc_rabbitmq
- nc_websocket_server
- nc_db
volumes:
- ./:/code
- ./var/networks:/code/var/network-data
- ./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 request_prediction -m 10 -v
nc_phpfpm:
build: docker/php
user: www-data
links:
- nc_rabbitmq
- nc_db
- nc_redis
volumes:
- ./:/code
- composer_cache:/var/www/.composer
- ./var/networks:/code/var/network-data
- ./var/log:/code/var/logs
- ./var/shared-images:/code/web/images
- ./docker/php/phpfpm.conf:/usr/local/etc/php-fpm.d/www.conf
command: wait-for-it nc_db:3306 -- wait-for-it nc_rabbitmq:5672 -- php-fpm
nc_websocket_server:
build: docker/nodejs
user: www-data
ports:
- '8081:8081'
volumes:
- ./:/code
- ./var/networks:/code/var/network-data
- ./var/log:/code/var/logs
restart: unless-stopped
command: node /code/nodejs/websocket-server.js
nc_nginx:
build: docker/nginx
volumes:
- ./:/code
- ./docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
environment:
- NGINX_HOST=neuralcoin.local
links:
- nc_phpfpm
- nc_websocket_server
ports:
- '80:80'
command: wait-for-it nc_phpfpm:9000 -- wait-for-it nc_websocket_server:8081 -- nginx
nc_db:
build: docker/mysql
environment:
- MYSQL_ROOT_PASSWORD=root
expose:
- '3306'
volumes:
- mysql_data:/var/lib/mysql
command: mysqld --sql-mode=NO_ENGINE_SUBSTITUTION
#management is on port 15672
nc_rabbitmq:
image: rabbitmq:management
expose:
- '15672'
- '5672'
nc_redis:
image: redis:3.2
#
# python services
#
nc_network_creator:
build: docker/python
user: www-data
links:
- nc_rabbitmq
volumes:
- ./:/code
- ./var/networks:/code/var/network-data
restart: unless-stopped
command: wait-for-it nc_rabbitmq:5672 -- python -u python/consume-create-network.py
nc_network_trainer:
build: docker/python
user: www-data
links:
- nc_rabbitmq
volumes:
- ./:/code
- ./var/networks:/code/var/network-data
restart: unless-stopped
command: wait-for-it nc_rabbitmq:5672 -- python -u python/consume-train-network.py
nc_get_prediction:
build: docker/python
user: www-data
restart: unless-stopped
links:
- nc_rabbitmq
volumes:
- ./:/code
- ./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
user: root
restart: unless-stopped
links:
- nc_db
- nc_rabbitmq
- nc_redis
volumes:
- ./:/code
- ./var/log:/code/var/logs
- ./docker/crontab:/etc/crontab
command: wait-for-it nc_db:3306 -- wait-for-it nc_rabbitmq:5672 -- bin/run-crons
volumes:
mysql_data:
composer_cache: