Skip to content

Commit 0e4480c

Browse files
committed
[chore] code samples to use a connector from GitHub releases instead of building its own
1 parent 0a4d6b4 commit 0e4480c

File tree

7 files changed

+34
-34
lines changed

7 files changed

+34
-34
lines changed

Dockerfile-Samples

Lines changed: 0 additions & 20 deletions
This file was deleted.
File renamed without changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM ubuntu:latest AS builder
2+
WORKDIR /opt
3+
RUN apt-get update && apt-get install -y curl wget unzip jq
4+
RUN curl -s https://api.github.com/repos/questdb/kafka-questdb-connector/releases/latest | jq -r '.assets[]|select(.content_type == "application/zip")|.browser_download_url'|wget -qi -
5+
RUN unzip kafka-questdb-connector-*-bin.zip
6+
7+
FROM confluentinc/cp-kafka-connect:7.2.1
8+
COPY --from=builder /opt/kafka-questdb-connector/*.jar /usr/share/java/kafka/

kafka-questdb-connector-samples/faker/docker-compose.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '2.1'
22
services:
33
questdb:
4-
image: questdb/questdb:6.5.3
4+
image: questdb/questdb:6.5.4
55
expose:
66
- "9009"
77
ports:
@@ -31,8 +31,7 @@ services:
3131
producer:
3232
image: kafka-questdb-connector-samples-faker-generator
3333
build:
34-
dockerfile: ./Dockerfile
35-
context: .
34+
dockerfile: Dockerfile-App
3635
depends_on:
3736
- kafka
3837
links:
@@ -41,16 +40,23 @@ services:
4140
connect:
4241
image: kafka-questdb-connector-samples-connect
4342
build:
44-
dockerfile: ./Dockerfile-Samples
45-
context: ./../../
43+
dockerfile: ./Dockerfile-Connect
4644
ports:
4745
- "8083:8083"
4846
depends_on:
4947
- kafka
5048
links:
5149
- kafka:kafka
5250
environment:
53-
BOOTSTRAP_SERVERS: "kafka:9092"
54-
CONFIG_STORAGE_TOPIC: "debezium_connect_config"
55-
OFFSET_STORAGE_TOPIC: "debezium_connect_offsets"
56-
STATUS_STORAGE_TOPIC: "debezium_connect_status"
51+
CONNECT_BOOTSTRAP_SERVERS: "kafka:9092"
52+
CONNECT_GROUP_ID: "default"
53+
CONNECT_OFFSET_STORAGE_TOPIC: "connect-storage-topic"
54+
CONNECT_CONFIG_STORAGE_TOPIC: "connect-config-topic"
55+
CONNECT_STATUS_STORAGE_TOPIC: "connect-status-topic"
56+
CONNECT_KEY_CONVERTER: "org.apache.kafka.connect.storage.StringConverter"
57+
CONNECT_VALUE_CONVERTER: "org.apache.kafka.connect.json.JsonConverter"
58+
CONNECT_VALUE_CONVERTER_SCHEMAS_ENABLE: "false"
59+
CONNECT_REST_ADVERTISED_HOST_NAME: "connect"
60+
CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: "1"
61+
CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: "1"
62+
CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: "1"
File renamed without changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM ubuntu:latest AS builder
2+
WORKDIR /opt
3+
RUN apt-get update && apt-get install -y curl wget unzip jq
4+
RUN curl -s https://api.github.com/repos/questdb/kafka-questdb-connector/releases/latest | jq -r '.assets[]|select(.content_type == "application/zip")|.browser_download_url'|wget -qi -
5+
RUN unzip kafka-questdb-connector-*-bin.zip
6+
7+
FROM debezium/connect:1.9.6.Final
8+
COPY --from=builder /opt/kafka-questdb-connector/*.jar /kafka/connect/questdb-connector/

kafka-questdb-connector-samples/stocks/docker-compose.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '2.1'
22
services:
33
questdb:
4-
image: questdb/questdb:6.5.3
4+
image: questdb/questdb:6.5.4
55
expose:
66
- "9009"
77
ports:
@@ -65,8 +65,7 @@ services:
6565
producer:
6666
image: kafka-questdb-connector-samples-stocks-generator
6767
build:
68-
dockerfile: ./Dockerfile
69-
context: .
68+
dockerfile: Dockerfile-App
7069
depends_on:
7170
postgres:
7271
condition: service_healthy
@@ -75,8 +74,7 @@ services:
7574
connect:
7675
image: kafka-questdb-connector-samples-connect
7776
build:
78-
dockerfile: ./Dockerfile-Samples
79-
context: ./../../
77+
dockerfile: ./Dockerfile-Connect
8078
ports:
8179
- "8083:8083"
8280
depends_on:

0 commit comments

Comments
 (0)