-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-source.yml
75 lines (74 loc) · 2.7 KB
/
docker-compose-source.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
69
70
71
72
73
74
75
version: "3.2"
services:
postgres:
image: postgres:9.6.11
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- ./init/schema.sql:/docker-entrypoint-initdb.d/1-schema.sql
- ./init/insert.sql:/docker-entrypoint-initdb.d/2-insert.sql
connect-jdbc:
build:
context: ./
#image: cloudstark/kafka-connect-jdbc:latest
environment:
CONNECT_BOOTSTRAP_SERVERS: "kafka:9092"
CONNECT_GROUP_ID: "connect-jdbc"
CONNECT_CONFIG_STORAGE_TOPIC: "connect-jdbc-config"
CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: 1
CONNECT_OFFSET_STORAGE_TOPIC: "connect-jdbc-offset"
CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: 1
CONNECT_STATUS_STORAGE_TOPIC: "connect-jdbc-status"
CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: 1
CONNECT_KEY_CONVERTER: "org.apache.kafka.connect.json.JsonConverter"
CONNECT_INTERNAL_KEY_CONVERTER: "org.apache.kafka.connect.json.JsonConverter"
CONNECT_VALUE_CONVERTER: "org.apache.kafka.connect.json.JsonConverter"
CONNECT_INTERNAL_VALUE_CONVERTER: "org.apache.kafka.connect.json.JsonConverter"
CONNECT_REST_ADVERTISED_HOST_NAME: "connect-jdbc"
CONNECT_REST_PORT: 8083
SECRETS_PROVIDER: "env"
CONNECTOR_NAME: "connect-jdbc"
CONNECTOR_CONNECTOR_CLASS: "io.confluent.connect.jdbc.JdbcSourceConnector"
CONNECTOR_TASKS_MAX: 1
CONNECTOR_DIALECT_NAME: "PostgreSqlDatabaseDialect"
CONNECTOR_CONNECTION_URL: "jdbc:postgresql://postgres:5432/postgres"
CONNECTOR_CONNECTION_USER: "postgres"
CONNECTOR_CONNECTION_PASSWORD: "postgres"
CONNECTOR_MODE: "bulk"
CONNECTOR_TOPIC_PREFIX: "users"
CONNECTOR_QUERY: "SELECT * FROM users"
depends_on:
- kafka
- postgres
ports:
- "8083:8083"
zookeeper:
image: strimzi/kafka:0.16.1-kafka-2.4.0
command: [
"sh", "-c",
"bin/zookeeper-server-start.sh config/zookeeper.properties"
]
ports:
- "2181:2181"
environment:
LOG_DIR: /tmp/logs
kafka:
image: strimzi/kafka:0.16.1-kafka-2.4.0
command: [
"sh", "-c",
"bin/kafka-server-start.sh config/server.properties --override listeners=$${KAFKA_LISTENERS} --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} --override zookeeper.connect=$${KAFKA_ZOOKEEPER_CONNECT} --override num.partitions=$${KAFKA_NUM_PARTITIONS}"
]
depends_on:
- zookeeper
ports:
- "9092:9092"
environment:
LOG_DIR: "/tmp/logs"
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_NUM_PARTITIONS: 1