-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
136 lines (123 loc) · 3.51 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
version: '3.3'
networks:
default:
external:
name: net0
services:
elastic-master:
image: 'elasticsearch:5.4'
ports:
- '9292:9200'
volumes:
- ${PWD}/data/es_nodes/master:/usr/share/elasticsearch/data
command: '-Ecluster.name="tweets" -Enode.name="master" -Enode.master=true -Enode.data=false -Ehttp.cors.allow-credentials=true -Ehttp.cors.enabled=true -Ehttp.cors.allow-origin="*" -Enetwork.host=0.0.0.0 -Enetwork.bind_host=0.0.0.0 -Enetwork.publish_host=elastic-master -Ediscovery.zen.ping.unicast.hosts="elastic-master"'
environment:
- "ES_JAVA_OPTS=-Xms750m -Xmx750m"
labels:
type: "platform"
deploy:
mode: replicated
replicas: 1
# placement:
# constraints:
# - node.labels.ogmios-${ENV}-secondary == true
elastic-slave1:
image: 'elasticsearch:5.4'
environment:
- "ES_JAVA_OPTS=-Xms750m -Xmx750m"
volumes:
- ${PWD}/data/es_nodes/slave1:/usr/share/elasticsearch/data
command: '-Ecluster.name="tweets" -Enode.master=false -Enode.data=true -Enetwork.bind_host=_eth0:ipv4_ -Enetwork.publish_host=_eth0:ipv4_ -Ediscovery.zen.ping.unicast.hosts="elastic-master"'
labels:
type: "platform"
deploy:
mode: replicated
replicas: 1
elastic-slave2:
image: 'elasticsearch:5.4'
environment:
- "ES_JAVA_OPTS=-Xms750m -Xmx750m"
volumes:
- ${PWD}/data/es_nodes/slave2:/usr/share/elasticsearch/data
command: '-Ecluster.name="tweets" -Enode.master=false -Enode.data=true -Enetwork.bind_host=_eth0:ipv4_ -Enetwork.publish_host=_eth0:ipv4_ -Ediscovery.zen.ping.unicast.hosts="elastic-master"'
labels:
type: "platform"
deploy:
mode: replicated
replicas: 1
kibana:
image: 'kibana:5.4'
ports:
- '5656:5601'
depends_on:
- 'elastic-master'
environment:
- ELASTICSEARCH_URL=http://elastic-master:9200
rabbitmq:
image: 'rabbitmq:3.6.14-management'
hostname: rabbitmq
ports:
- 15672:15672
- 5672:5672
environment:
RABBITMQ_DEFAULT_USER: user
RABBITMQ_DEFAULT_PASS: password
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS: '-rabbit tcp_listeners [{"::",5672}]'
restart: on-failure
deploy:
mode: replicated
replicas: 1
consumer:
image: 'python_flask'
build: './python_flask'
volumes:
- ${PWD}:/usr/src/app
command: "python /usr/src/app/consumer.py --path /usr/src/app/data/"
depends_on:
- rabbitmq
- elastic-master
deploy:
mode: replicated
replicas: 1
filter_runner:
image: 'python_flask'
build: './python_flask'
volumes:
- ${PWD}:/usr/src/app
depends_on:
- 'streamer_1'
deploy:
mode: replicated
replicas: 1
command: 'python start_filter.py'
sample_runner:
image: 'python_flask'
build: './python_flask'
volumes:
- ${PWD}:/usr/src/app
depends_on:
- 'streamer_0'
deploy:
mode: replicated
replicas: 1
command: 'python start_sample.py'
streamer_0:
image: 'python_flask'
build: './python_flask'
ports:
- '5050:5000'
volumes:
- ${PWD}:/usr/src/app
depends_on:
- 'elastic-master'
command: 'python server.py --path /usr/src/app/data/ --key 0'
streamer_1:
image: 'python_flask'
build: './python_flask'
ports:
- '5051:5000'
volumes:
- ${PWD}:/usr/src/app
depends_on:
- 'elastic-master'
command: 'python server.py --path /usr/src/app/data/ --key 1'