-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
100 lines (93 loc) · 2.34 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
version: '3.9'
services:
mongodb:
restart: always
image: mongo:latest
env_file:
- .env
environment:
MONGO_INITDB_DATABASE: ${MONGO_DATABASE_NAME}
MONGO_INITDB_ROOT_USERNAME: ${MONGO_DATABASE_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_DATABASE_ROOT_PASSWORD}
ports:
- '27017:27017'
volumes:
- mongodb-data:/data/db
- mongodb-log:/var/log/mongodb
- ./mongo/mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh
# sudo docker-compose rm -vfs
zookeeper:
restart: always
image: docker.io/bitnami/zookeeper:3.8
ports:
- '2181:2181'
volumes:
- 'zookeeper-volume:/bitnami'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
restart: always
image: docker.io/bitnami/kafka:3.3
ports:
- '9093:9093'
volumes:
- 'kafka-volume:/bitnami'
environment:
- KAFKA_BROKER_ID=1
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_LISTENERS=CLIENT://:9092,EXTERNAL://:9093
- KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka:9092,EXTERNAL://localhost:9093
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME=CLIENT
depends_on:
- zookeeper
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.14
environment:
- xpack.security.enabled=false
- discovery.type=single-node
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
cap_add:
- IPC_LOCK
ports:
- '9200:9200'
- '9300:9300'
volumes:
- esdata:/usr/share/elasticsearch/data
kibana:
image: docker.elastic.co/kibana/kibana:7.17.14
restart: always
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
ports:
- '5601:5601'
links:
- elasticsearch
depends_on:
- elasticsearch
logstash:
image: docker.elastic.co/logstash/logstash:7.17.14
volumes:
- ./logstash:/config-dir
command: logstash -f /config-dir/logstash.conf
links:
- elasticsearch
depends_on:
- elasticsearch
- kafka
volumes:
mongodb-data:
driver: local
mongodb-log:
driver: local
esdata:
driver: local
kafka-volume:
zookeeper-volume: