forked from SimoneBorrometi/MailScan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
171 lines (156 loc) · 3.99 KB
/
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
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
name: mailscan
services:
stalwart:
image: stalwartlabs/mail-server:latest
ports:
- "443:443"
- "8080:8080"
- "25:25"
- "587:587"
- "465:465"
- "143:143"
- "993:993"
- "4190:4190"
networks:
net:
ipv4_address: 172.16.0.5
tty: true
stdin_open: true
volumes:
- type: bind
source: ./stalwart-mail
target: /opt/stalwart-mail
broker:
image: apache/kafka:latest
hostname: broker
container_name: broker
ports:
- '9092:9092'
networks:
net:
ipv4_address: 172.16.0.6
environment:
KAFKA_NODE_ID: 1
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT_HOST://broker:9092,PLAINTEXT://broker:19092'
KAFKA_PROCESS_ROLES: 'broker,controller'
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@broker:29093'
KAFKA_LISTENERS: 'CONTROLLER://:29093,PLAINTEXT_HOST://:9092,PLAINTEXT://:19092'
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
CLUSTER_ID: '4L6g3nShT-eMCtK--X86sw'
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_LOG_DIRS: '/tmp/kraft-combined-logs'
kafka-topics:
image: apache/kafka:latest
command: >
bash -c "/opt/kafka/bin/kafka-topics.sh --create --topic mails --bootstrap-server broker:9092
&& /opt/kafka/bin/kafka-topics.sh --create --topic summary --bootstrap-server broker:9092"
depends_on:
- broker
networks:
- net
logstash:
build: ./logstash
networks:
- net
stdin_open: true
tty: true
environment:
MAIL_USR_PSW_FILE: /run/secrets/mail_usr_psw
LOGSTASH_KEYSTORE_FILE: /run/secrets/logstash_keystore_pass
secrets:
- mail_usr_psw
- logstash_keystore_pass
depends_on:
kafka-topics:
condition: service_completed_successfully
pyflink:
build: ./flink/pyflink
networks:
- net
ports:
- 8081:8081
hostname: jobmanager
entrypoint: [ "python", "/summarizer.py"]
environment:
- |
FLINK_PROPERTIES:
jobmanager.rpc.address: jobmanager
rest.port: 8081
rest.address: localhost
rest.bind-address: 0.0.0.0
depends_on:
- elasticsearch
# jobmanager:
# build: ./flink/pyflink
# hostname: "jobmanager"
# expose:
# - "6123"
# ports:
# - "9090:8081"
# command: jobmanager
# environment:
# - JOB_MANAGER_RPC_ADDRESS=jobmanager
# networks:
# - net
# taskmanager:
# build: ./flink/pyflink
# expose:
# - "6121"
# - "6122"
# depends_on:
# - jobmanager
# command: taskmanager
# links:
# - jobmanager:jobmanager
# environment:
# - JOB_MANAGER_RPC_ADDRESS=jobmanager
# - TASK_MANAGER_NUMBER_OF_TASK_SLOTS=2
# networks:
# - net
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.23
hostname: "es01"
networks:
- net
ports:
- 9200:9200
- 9300:9300
environment:
- discovery.type=single-node
grafana:
image: grafana/grafana-enterprise
networks:
- net
ports:
- 3000:3000
volumes:
- grafana-storage:/var/lib/grafana
- type: bind
source: ./grafana/elastic.yaml
target: /usr/share/grafana/provisioning/datasources/elastic.yaml
redpanda:
image: docker.redpanda.com/redpandadata/console:latest
ports:
- 6060:8080
networks:
- net
environment:
KAFKA_BROKERS: broker:9092
networks:
net:
driver: bridge
ipam:
config:
- subnet: 172.16.0.0/16
secrets:
mail_usr_psw:
file: ./secrets/user-password
logstash_keystore_pass:
file: ./secrets/logstash-keystore
volumes:
grafana-storage: {}