-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
142 lines (134 loc) · 3.73 KB
/
Copy pathdocker-compose.yml
File metadata and controls
142 lines (134 loc) · 3.73 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
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
134
135
136
137
138
139
140
141
142
services:
postgres:
image: postgres:16
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
command:
- "postgres"
- "-c"
- "wal_level=logical"
- "-c"
- "max_wal_senders=4"
- "-c"
- "max_replication_slots=4"
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
- ./scripts:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 10
restart: unless-stopped
kafka:
image: apache/kafka:3.7.0
environment:
KAFKA_NODE_ID: 1
KAFKA_PROCESS_ROLES: broker,controller
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka:9093
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
CLUSTER_ID: MkU3OEVBNTcwNTJENDM2Qk
ports:
- "9092:9092"
healthcheck:
test: ["CMD-SHELL", "/opt/kafka/bin/kafka-broker-api-versions.sh --bootstrap-server localhost:9092 > /dev/null 2>&1"]
interval: 10s
timeout: 10s
retries: 15
start_period: 30s
restart: unless-stopped
kafka-connect:
image: debezium/connect:2.6
environment:
BOOTSTRAP_SERVERS: kafka:9092
GROUP_ID: 1
CONFIG_STORAGE_TOPIC: connect_configs
OFFSET_STORAGE_TOPIC: connect_offsets
STATUS_STORAGE_TOPIC: connect_statuses
CONFIG_STORAGE_REPLICATION_FACTOR: 1
OFFSET_STORAGE_REPLICATION_FACTOR: 1
STATUS_STORAGE_REPLICATION_FACTOR: 1
ports:
- "8083:8083"
depends_on:
postgres:
condition: service_healthy
kafka:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8083/connectors || exit 1"]
interval: 10s
timeout: 10s
retries: 15
start_period: 30s
restart: unless-stopped
kafka-ui:
image: provectuslabs/kafka-ui:latest
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9092
KAFKA_CLUSTERS_0_KAFKACONNECT_0_NAME: debezium
KAFKA_CLUSTERS_0_KAFKACONNECT_0_ADDRESS: http://kafka-connect:8083
ports:
- "8080:8080"
depends_on:
kafka:
condition: service_healthy
ingestor:
build: ./ingest
environment:
PGHOST: postgres
PGPORT: "5432"
PGUSER: ${POSTGRES_USER}
PGPASSWORD: ${POSTGRES_PASSWORD}
PGDATABASE: ${POSTGRES_DB}
POLL_INTERVAL: "60"
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
jobmanager:
build: ./flink
ports:
- "8082:8081"
command: jobmanager
environment:
JOB_MANAGER_RPC_ADDRESS: jobmanager
volumes:
- ./flink/sql:/opt/flink/sql
depends_on:
kafka:
condition: service_healthy
restart: unless-stopped
taskmanager:
build: ./flink
command: taskmanager
environment:
JOB_MANAGER_RPC_ADDRESS: jobmanager
depends_on:
- jobmanager
restart: unless-stopped
duckdb-consumer:
build: ./analytics/consumer
environment:
KAFKA_BOOTSTRAP_SERVERS: kafka:9092
DUCKDB_PATH: /data/mobility.duckdb
volumes:
- ./analytics/data:/data
depends_on:
kafka:
condition: service_healthy
restart: unless-stopped
volumes:
pgdata: