-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
98 lines (91 loc) · 2.68 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
services:
# docker run -d --name=main-postgres -p 5432:5432 -v postgres-volume:/var/lib/postgresql/data -e POSTGRES_PASSWORD=postgres postgres
postgres:
image: postgres:14.11
platform: linux/amd64
ports:
- '127.0.0.1:5432:5432'
environment:
- POSTGRES_PASSWORD=postgres
volumes:
- postgres-volume:/var/lib/postgresql/data
# docker run -d --name=main-mysql-5-7 -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -v mysql-5-7-volume:/var/lib/mysql mysql:5.7
mysql-5-7:
image: mysql:5.7
platform: linux/amd64
ports:
- '127.0.0.1:3306:3306'
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
volumes:
- mysql-5-7-volume:/var/lib/mysql
# docker run -d --name=main-mysql-8 -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -v mysql-8-volume:/var/lib/mysql mysql
mysql-8:
image: mysql
platform: linux/amd64
ports:
- '127.0.0.1:3306:3306'
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
volumes:
- mysql-8-volume:/var/lib/mysql
# docker run --name main-redis -d redis redis-server --save 60 1 --loglevel warning -p 6379:6379 -v redis-volume:/data
redis:
image: redis
platform: linux/amd64
ports:
- '127.0.0.1:6379:6379'
command: redis-server --save 60 1 --loglevel warning
volumes:
- redis-volume:/data
mongo:
image: mongo
platform: linux/amd64
ports:
- '127.0.0.1:27017:27017'
volumes:
- mongo-volume:/data/db
zookeeper:
image: confluentinc/cp-zookeeper:latest
platform: linux/amd64
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ports:
- 22181:2181
volumes:
- zookeeper-volume:/var/lib/zookeeper/data
- zookeeper-volume:/var/lib/zookeeper/log
- zookeeper-volume:/etc/zookeeper/secrets
kafka:
image: confluentinc/cp-kafka:latest
platform: linux/amd64
depends_on:
- zookeeper
ports:
- 9092:9092
volumes:
- kafka-volume:/var/lib/kafka/data
- kafka-volume:/etc/kafka/secrets
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:19092,PLAINTEXT_HOST://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
volumes:
postgres-volume:
name: postgres-volume
mysql-5-7-volume:
name: mysql-5-7-volume
mysql-8-volume:
name: mysql-8-volume
redis-volume:
name: redis-volume
mongo-volume:
name: mongo-volume
zookeeper-volume:
name: zookeeper-volume
kafka-volume:
name: kafka-volume