-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (53 loc) · 1.96 KB
/
Copy pathdocker-compose.yml
File metadata and controls
55 lines (53 loc) · 1.96 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
services:
kafka:
image: confluentinc/confluent-local:7.4.3
hostname: kafka
container_name: kafka
ports:
- "9092:9092" # for client connections
- "9101:9101" # JMX
restart: unless-stopped
environment:
KAFKA_NODE_ID: 1
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092'
KAFKA_JMX_PORT: 9101
KAFKA_JMX_HOSTNAME: localhost
KAFKA_PROCESS_ROLES: 'broker,controller'
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@kafka:29093'
KAFKA_LISTENERS: 'PLAINTEXT://kafka:29092,CONTROLLER://kafka:29093,PLAINTEXT_HOST://0.0.0.0:9092'
CLUSTER_ID: 'K0EA9p0yEe6MkAAAAkKsEg'
kafka-init-topics:
image: confluentinc/confluent-local:7.4.3
container_name: kafka-init-topics
depends_on:
- kafka
command: "bash -c \
'kafka-topics --create --topic telemetry.sensors.v1 \
--partitions 1 --replication-factor 1 --if-not-exists \
--bootstrap-server kafka:29092 && \
kafka-topics --create --topic telemetry.snapshots.v1 \
--partitions 1 --replication-factor 1 --if-not-exists \
--bootstrap-server kafka:29092 && \
kafka-topics --create --topic telemetry.hubs.v1 \
--partitions 1 --replication-factor 1 --if-not-exists \
--bootstrap-server kafka:29092'"
init: true
postgres:
image: postgres:16.1
container_name: postgres
hostname: postgres
environment:
POSTGRES_USER: dbuser
POSTGRES_PASSWORD: 12345
POSTGRES_DB: telemetry_analyzer
volumes:
- ./docker/init-databases.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: pg_isready -q -d $$POSTGRES_DB -U $$POSTGRES_USER
timeout: 5s
interval: 5s
retries: 10
# volumes:
# - postgres:/data/postgres
ports:
- "5432:5432"