-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
118 lines (108 loc) · 3.8 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
version: '3.4'
services:
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181"
kafka:
image: eugenepy/kafka-docker:latest
depends_on:
- zookeeper
ports:
- "9092:9092"
environment:
# HOSTNAME_COMMAND: "route -n | awk '/UG[ \t]/{print $$2}'"
KAFKA_ADVERTISED_HOST_NAME: localhost
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9093,PLAINTEXT_HOST://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_LISTENERS: PLAINTEXT://:9093,PLAINTEXT_HOST://:9092
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
volumes:
- type: volume
source: kafka_data
target: /kafka
mongo: # arctic
image: mongo
environment:
- MONGO_INITDB_ROOT_USERNAME=akira_data
- MONGO_INITDB_ROOT_PASSWORD=akira_data
ports:
- 27017:27017
volumes:
- type: volume
source: mongo_data
target: /data/db
quote-producer:
image: eugenepy/data-pipeline:latest
depends_on:
- mongo
- kafka
environment:
- MONGODB_URI=mongodb://akira_data:akira_data@mongo:27017
- KAFKA_BOOSTRAPHOST=kafka:9093
- INVESTINGDOT_COM_TOPIC=investingdotcom
command: "python akira/data_pipeline/server/run_websocket.py 1 2 --max_retry=-1" # streaming task
restart: on-failure
data-pipeline:
image: eugenepy/data-pipeline:latest
build:
context: .
target: runtime
dockerfile: akira/data_pipeline/Dockerfile
args:
- REQUIREMENTS_PATH=akira/data_pipeline
depends_on:
- quote-producer
environment:
- KAFKA_BOOSTRAPHOST=kafka:9093
- MONGODB_URI=mongodb://akira_data:akira_data@mongo:27017
- MODEL_TOPIC=model_topic
- INVESTINGDOT_COM_TOPIC=investingdotcom
- TICK_DATA_TOPIC=tick-topic
command: "python akira/data_pipeline/server/app.py worker -l info"
restart: on-failure
deploy:
mode: replicated
replicas: 6
position-manager: # in charge of testing, and order management.
image: eugenepy/position-manager:latest
build:
context: .
target: runtime
dockerfile: akira/position_manager/Dockerfile
args:
- REQUIREMENTS_PATH=akira/position_manager
depends_on:
- kafka
environment:
- KAFKA_BOOSTRAPHOST=kafka:9093
- MODEL_TOPIC=model_topic
- ORDER_TOPIC=orders
- TICK_DATA_TOPIC=tick-topic
- MONGODB_URI=mongodb://akira_data:akira_data@mongo:27017
command: "python akira/position_manager/account_server.py worker -l info"
restart: on-failure
order-exec: # price execution
image: eugenepy/position-manager:latest
build:
context: .
target: runtime
dockerfile: akira/position_manager/Dockerfile
args:
- REQUIREMENTS_PATH=akira/position_manager
depends_on:
- position-manager
environment:
- KAFKA_BOOSTRAPHOST=kafka:9093
- MODEL_TOPIC=model_topic
- ORDER_TOPIC=orders
- TICK_DATA_TOPIC=tick-topic
- MONGODB_URI=mongodb://akira_data:akira_data@mongo:27017
command: "python akira/position_manager/execution.py worker -l info"
restart: on-failure
volumes:
kafka_data:
driver: local
mongo_data:
driver: local