-
Notifications
You must be signed in to change notification settings - Fork 14
/
live-docker-compose.yaml
127 lines (119 loc) · 3.31 KB
/
live-docker-compose.yaml
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
version: "3"
services:
producer:
container_name: twittersentimentanalysis_producer
build: "./produce-tweets"
depends_on:
- kafka
- influxdb
restart: on-failure
# command: >
# python run.py
volumes:
- ./produce-tweets:/produce-tweets
- ./config.ini:/produce-tweets/config.ini
environment:
- "NETWORK_ACCESS=internal"
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
consumer:
container_name: twittersentimentanalysis_consumer
build: "./consume-tweets"
depends_on:
- kafka
- influxdb
restart: on-failure
# command: >
# python run.py
volumes:
- ./consume-tweets:/consume-tweets
- ./config.ini:/consume-tweets/config.ini
- ./model/model.pickle:/consume-tweets/model.pickle
environment:
- "NETWORK_ACCESS=internal"
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
zookeeper:
container_name: twittersentimentanalysis_zookeeper
image: wurstmeister/zookeeper:3.4.6
restart: on-failure
expose:
- "2181"
environment:
- "NETWORK_ACCESS=internal"
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
kafka:
container_name: twittersentimentanalysis_kafka
image: wurstmeister/kafka:2.12-2.4.0
depends_on:
- zookeeper
restart: on-failure
expose:
- "9093"
volumes:
- ./persistence/kafka:/tmp/kafka-logs
environment:
- "NETWORK_ACCESS=internal"
- "KAFKA_BROKER_ID=1"
- "KAFKA_LISTENERS=INSIDE://0.0.0.0:9093"
- "KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=INSIDE:PLAINTEXT"
- "KAFKA_ADVERTISED_LISTENERS=INSIDE://kafka:9093"
- "KAFKA_INTER_BROKER_LISTENER_NAME=INSIDE"
- "KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181"
- "KAFKA_CREATE_TOPICS=tweets:1:1"
- "KAFKA_LOG_DIRS=/tmp/kafka-logs"
- "KAFKA_LOG_RETENTION_HOURS=24"
- "KAFKA_LOG_CLEANUP_POLICY=delete"
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
influxdb:
container_name: twittersentimentanalysis_influxdb
image: influxdb:1.7.10
restart: on-failure
expose:
- "8086"
volumes:
- ./persistence/influxdb:/var/lib/influxdb
environment:
- "INFLUXDB_GRAPHITE_ENABLED=false"
- "NETWORK_ACCESS=internal"
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
grafana:
container_name: twittersentimentanalysis_grafana
image: grafana/grafana:6.5.2
restart: on-failure
expose:
- "3000"
environment:
- "GF_INSTALL_PLUGINS=grafana-piechart-panel,grafana-worldmap-panel"
- "GF_AUTH_ANONYMOUS_ENABLED=true"
- "GF_AUTH_ANONYMOUS_org_name=Main Org."
- "GF_AUTH_ANONYMOUS_org_role=Admin"
# Nginx Reverse Proxy configuration (SSL Encryption)
- "VIRTUAL_PORT=3000" # Grafana by default listens on 3000
- "VIRTUAL_HOST=<subdomain.domain.tld>"
- "LETSENCRYPT_HOST=<subdomain.domain.tld>"
# - "LETSENCRYPT_EMAIL=<[email protected]>" # optional
volumes:
- ./persistence/grafana:/var/lib/grafana
networks:
default:
external:
name: nginx-proxy-network