This repository has been archived by the owner on Sep 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
185 lines (171 loc) · 4.94 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
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
version: '2'
services:
traptor:
build:
context: .
image: istresearch/traptor
volumes:
- logs:/var/log/traptor
env_file:
- ./traptor.env
depends_on:
- redis
- kafka
environment:
- TRAPTOR_TYPE=track
- KAFKA_HOSTS=kafka:9092
- KAFKA_TOPIC=traptor
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_DB=1
- REDIS_PUBSUB_CHANNEL=traptor-notify
- HEARTBEAT_INTERVAL=10
- RULE_CHECK_INTERVAL=5
- LOG_STDOUT=False
- RATE_LIMITING_ENABLED=True
- RATE_LIMITING_RATE_SEC=2.0
- RATE_LIMITING_CAPACITY=10
- RATE_LIMITING_COST=1
- RATE_LIMITING_REPORTING_INTERVAL_SEC=10
- DW_ENABLED=False
- DW_LOCAL=True # True for local dev
- DW_STATSD_HOST=statsd # on a linux host set to 172.17.0.1 and on mac os host set to docker.for.mac.localhost
- DW_STATSD_PORT=8125 # port statsd container is listening on
healthcheck:
image: istresearch/traptor
volumes:
- .:/code
- logs:/var/log/traptor
env_file:
- ./traptor.env
depends_on:
- redis
command: ["python3", "traptor/healthcheck.py"]
environment:
- KAFKA_HOSTS=kafka:9092
- KAFKA_TOPIC=traptor
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_DB=1
- DW_ENABLED=True
- DW_LOCAL=False # True for local dev
- LOG_STDOUT=True # True for local dev
- DW_STATSD_HOST=172.17.0.1 # on a linux host set to 172.17.0.1 and on mac os host set to docker.for.mac.localhost
- DW_STATSD_PORT=8125 # port statsd container is listening on
- HEALTHCHECK_REDIS_SLEEP=30
- HEALTHCHECK_KAFKA_SLEEP=30
- HEALTHCHECK_TWITTER_SLEEP=600
restart: always
redis:
image: redis:2.8.17
ports:
- "6379:6379"
kafka:
image: wurstmeister/kafka
ports:
- "9092:9092"
environment:
#KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092 # If trying to connect from outside docker, enable this
#KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092 # If trying to connect from inside docker, enable this
KAFKA_LISTENERS: PLAINTEXT://:9092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_CREATE_TOPICS: "traptor:1:1"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- zookeeper
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.12.0
command: elasticsearch
-E network.host=0.0.0.0
-E discovery.zen.minimum_master_nodes=1
-E cluster.name="docker-cluster"
-E node.name="master-1"
-E node.master=true
-E node.data=true
-E node.ingest=false
-E cluster.initial_master_nodes="master-1"
-E bootstrap.memory_lock=true
-E xpack.security.enabled=false
-E xpack.monitoring.enabled=false
-E xpack.graph.enabled=false
-E xpack.watcher.enabled=false
ports:
- "9200:9200"
- "9300:9300"
environment:
ES_JAVA_OPTS: "-Xms256m -Xmx256m"
ulimits:
memlock:
soft: -1
hard: -1
logstash:
image: docker.elastic.co/logstash/logstash:7.12.0
command: logstash -f /etc/logstash/conf.d/logstash.conf
volumes:
- ./logstash/traptor-logstash.conf:/etc/logstash/conf.d/logstash.conf
- ./logstash/logs-template.json:/etc/logstash/templates/logs-template.json
- logs:/var/log/traptor
kibana:
image: docker.elastic.co/kibana/kibana:7.12.0
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
- XPACK_SECURITY_ENABLED=False
- XPACK_MONITORING_ENABLED=False
- XPACK_GRAPH_ENABLED=False
- XPACK_REPORTING_ENABLED=False
ports:
- "5601:5601"
depends_on:
- elasticsearch
#QCR-specific, IST does not have nor use
piscina:
image: istresearch/piscina
restart: always
volumes:
- ./piscina:/usr/src/app/data/
#- ./piscina/local.ini:/usr/src/app/conf/local.ini
ports:
- "8000:8000"
- "8080:8080"
statsd:
image: hopsoft/graphite-statsd
ports:
- "8002:80"
kopf:
image: lmenezes/elasticsearch-kopf
ports:
- "8001:80"
environment:
- KOPF_SERVER_NAME=dockerhost
- KOPF_ES_SERVERS=elasticsearch:9200
depends_on:
- elasticsearch
twitterapi:
build:
context: .
dockerfile: Dockerfile.twitterapi
env_file:
- ./traptor.env
environment:
- LOG_NAME=twitterapi
- LOG_DIR=/var/log/twitterapi
- LOG_FILE=twitterapi.log
- LOG_STDOUT=True
- LOG_JSON=True
- LOG_LEVEL=INFO
- API_BACKEND=local
ports:
- "5000:5000"
volumes:
- ./logs:/var/log/twitterapi
restart: always
#command: bash -c "python -m traptor.manager.run" # To run the single threaded flask server
volumes:
logs: