-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
95 lines (88 loc) · 2.55 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
version: '3.8'
services:
zookeeper:
image: strimzi/kafka:0.11.3-kafka-2.1.0
command: [
"sh", "-c",
"bin/zookeeper-server-start.sh config/zookeeper.properties"
]
ports:
- "2181:2181"
environment:
LOG_DIR: /tmp/logs
kafka:
image: strimzi/kafka:0.11.3-kafka-2.1.0
container_name: kafka
hostname: kafka
command: [
"sh", "-c",
"bin/kafka-server-start.sh config/server.properties --override listeners=$${KAFKA_LISTENERS} --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} --override zookeeper.connect=$${KAFKA_ZOOKEEPER_CONNECT}"
]
depends_on:
- zookeeper
ports:
- "9092:9092"
environment:
LOG_DIR: "/tmp/logs"
# KAFKA_ADVERTISED_HOST_NAME: kafka
# KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9092,OUTSIDE://localhost:9092
# KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
# KAFKA_LISTENERS: INSIDE://0.0.0.0:9092,OUTSIDE://0.0.0.0:9092
# KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
# KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
KAFKA_ADVERTISED_HOST_NAME: kafka
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
mongo1:
image : mongo
container_name: mongo1
environment:
- PUID=1000
- PGID=1000
- MONGO_URI=mongodb://mongodb-myapp:27017/myapp
volumes:
- ./data/mongo/data1/database:/data/db
- ./bin/rs-init.sh:/scripts/rs-init.sh
- ./bin/db-ping.sh:/scripts/db-ping.sh
networks:
- mongors-network
links:
- mongo2
- mongo3
ports:
- "27021:27017"
restart: always
entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "dbrs" ]
mongo2:
image : mongo
container_name: mongo2
environment:
- PUID=1000
- PGID=1000
volumes:
- ./data/mongo/data2/database:/data/db
networks:
- mongors-network
ports:
- "27022:27017"
restart: always
entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "dbrs" ]
mongo3:
image : mongo
container_name: mongo3
environment:
- PUID=1000
- PGID=1000
volumes:
- ./data/mongo/data3/database:/data/db
networks:
- mongors-network
ports:
- "27023:27017"
restart: always
entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "dbrs" ]
networks:
mongors-network:
driver: bridge