-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
102 lines (93 loc) · 2.19 KB
/
docker-compose.yml
File metadata and controls
102 lines (93 loc) · 2.19 KB
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
services:
zookeeper:
image: 'bitnami/zookeeper:3.7'
networks:
- app-network
ports:
- "2181:2181"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
volumes:
- zookeeper_data:/bitnami
mysql:
image: mysql:latest
ports:
- "3306:3306"
env_file:
- .env # 동일한 환경 변수 파일을 사용
volumes:
- db_data:/var/lib/mysql
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
- ./my.cnf:/etc/mysql/conf.d/my.cnf
networks:
- app-network
redis:
image: redis:latest
container_name: redis
ports:
- "6379:6379"
networks:
- app-network
redis_insight:
image: redislabs/redisinsight:latest
container_name: redis_insight
ports:
- "5540:5540"
restart: always
networks:
- app-network
kafka:
image: 'bitnami/kafka:latest'
networks:
- app-network
ports:
- "9092:9092"
- "9094:9094"
depends_on:
- zookeeper
environment:
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_CFG_LISTENERS=PLAINTEXT://kafka:9092,EXTERNAL://kafka:9094
# - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,EXTERNAL://localhost:9094
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,EXTERNAL://192.168.0.15:9094
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=EXTERNAL:PLAINTEXT,PLAINTEXT:PLAINTEXT
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_AUTO_CREATE_TOPICS_ENABLE=true
volumes:
- kafka_data:/bitnami
kafka-ui:
image: provectuslabs/kafka-ui
container_name: kafka-ui
networks:
- app-network
ports:
- "8080:8080"
depends_on:
- kafka
environment:
KAFKA_CLUSTERS_0_NAME: "local-cluster"
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: "kafka:9092"
KAFKA_CLUSTERS_0_ZOOKEEPER: "zookeeper:2181"
KAFKA_CLUSTERS_0_READONLY: "false"
backend:
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"
depends_on:
- mysql
- redis
- kafka
env_file:
- .env
restart: always
networks:
- app-network
networks:
app-network:
external: true
volumes:
db_data:
zookeeper_data:
kafka_data: