-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
133 lines (126 loc) · 4.04 KB
/
docker-compose.yaml
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
version: "3.9"
services:
db:
image: postgres:16.2-alpine3.19
container_name: postgres
ports:
- "5400:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=drugstore
- PGDATA=/data/postgres
command:
- bash
- -c
- docker-entrypoint.sh -c config_file=/etc/postgresql/postgres.conf -c hba_file=/etc/postgresql/pg_hba.conf
volumes:
- ./vol/postgres:/data/postgres
- ./docker/postgresql:/etc/postgresql
restart: unless-stopped
networks:
- bridge-network
cache:
image: redis/redis-stack:7.2.0-v9
container_name: redis
ports:
- 6370:6379
volumes:
- ./vol/redis:/data
restart: unless-stopped
networks:
- bridge-network
kafka:
image: confluentinc/cp-kafka:7.6.0
container_name: kafka
volumes:
- ./vol/kafka:/var/lib/kafka
environment:
CLUSTER_ID: MkU3OEVBNTcwNTJENDM2Qk
KAFKA_NODE_ID: 1
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT"
KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092"
KAFKA_LISTENERS: "PLAINTEXT://kafka:29092,CONTROLLER://kafka:29093,PLAINTEXT_HOST://0.0.0.0:9092"
KAFKA_PROCESS_ROLES: "broker,controller"
KAFKA_CONTROLLER_QUORUM_VOTERS: "1@kafka:29093"
KAFKA_INTER_BROKER_LISTENER_NAME: "PLAINTEXT"
KAFKA_CONTROLLER_LISTENER_NAMES: "CONTROLLER"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
ports:
- 9092:9092
- 29092:29092
restart: unless-stopped
networks:
- bridge-network
kafka-connect:
image: confluentinc/cp-kafka-connect:7.6.0
container_name: kafka-connect
command:
- bash
- -c
- |
echo "Installing Connector"
confluent-hub install --no-prompt debezium/debezium-connector-postgresql:2.2.1
confluent connect plugin installjcustenborder/kafka-connect-redis:latest
echo "Launching Kafka Connect"
/etc/confluent/docker/run
volumes:
- ./vol/kafka-connect:/var/lib/kafka-connect
environment:
CONNECT_BOOTSTRAP_SERVERS: "kafka:29092"
CONNECT_GROUP_ID: categories-connect
CONNECT_CONFIG_STORAGE_TOPIC: _categories-connect-configs
CONNECT_OFFSET_STORAGE_TOPIC: _categories-connect-offsets
CONNECT_STATUS_STORAGE_TOPIC: _categories-connect-status
CONNECT_KEY_CONVERTER: org.apache.kafka.connect.json.JsonConverter
CONNECT_VALUE_CONVERTER: org.apache.kafka.connect.json.JsonConverter
CONNECT_INTERNAL_KEY_CONVERTER: org.apache.kafka.connect.json.JsonConverter
CONNECT_INTERNAL_VALUE_CONVERTER: org.apache.kafka.connect.json.JsonConverter
CONNECT_PLUGIN_PATH: /usr/share/java,/usr/share/confluent-hub-components
CONNECT_REST_ADVERTISED_HOST_NAME: kafka-connect
CONNECT_REPLICATION_FACTOR: 1
CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: 1
CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: 1
CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: 1
ports:
- 8083:8083
restart: unless-stopped
depends_on:
- kafka
networks:
- bridge-network
pgadmin:
image: dpage/pgadmin4:8.4
container_name: pgadmin
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: drugstore
PGADMIN_CONFIG_SERVER_MODE: "False"
volumes:
- ./vol/pgadmin:/root/.pgadmin
ports:
- "5050:80"
networks:
- bridge-network
kafka-ui:
image: provectuslabs/kafka-ui:v0.7.1
container_name: kafka-ui
ports:
- 8080:8080
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:29092
KAFKA_CLUSTERS_0_KAFKACONNECT_0_NAME: post
KAFKA_CLUSTERS_0_KAFKACONNECT_0_ADDRESS: http://kafka-connect:8083
DYNAMIC_CONFIG_ENABLED: "true"
depends_on:
- kafka
- kafka-connect
restart: unless-stopped
networks:
- bridge-network
networks:
bridge-network:
name: bridge-network
driver: bridge