-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-k8s.yml
68 lines (64 loc) · 1.79 KB
/
docker-compose-k8s.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
services:
zookeeper: # ZooKepper for Kafka
image: confluentinc/cp-zookeeper:7.4.3
container_name: blabber-hive-zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
networks:
- blabber-hive
broker: # Kafka Broker
image: confluentinc/cp-kafka:7.4.3
container_name: blabber-hive-broker
ports:
- "9092:9092"
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092,PLAINTEXT_INTERNAL://0.0.0.0:29092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:9092,PLAINTEXT_INTERNAL://broker:29092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
networks:
- blabber-hive
labels:
app: broker
postgres: # Postgres Container
image: postgres:15.5-alpine
container_name: blabber-hive-postgres
ports:
- "5432:5432"
networks:
- blabber-hive
env_file:
- backend/.env.docker
volumes:
- ./database:/var/lib/postgresql/data
labels:
app: postgres
redis: # Redis Container
image: redis:7.2.3-alpine3.18
container_name: blabber-hive-redis
ports:
- "6379:6379"
networks:
- blabber-hive
kafka-setup:
image: confluentinc/cp-kafka:latest
container_name: blabber-hive-kafka-setup
depends_on:
- broker
volumes:
- ./backend/create-kafka-topics.sh:/tmp/create-kafka-topics.sh
command: "/tmp/create-kafka-topics.sh"
networks:
- blabber-hive
labels:
app: redis
networks:
blabber-hive:
driver: bridge