-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
100 lines (96 loc) · 3.86 KB
/
docker-compose.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
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
---
services:
init:
command: /bin/sh /mnt/data/init.sh
container_name: init
depends_on:
kafka:
condition: service_healthy
image: confluentinc/cp-kafka:7.6.2
volumes:
- "./tests/resources/init:/mnt/data"
kafka:
container_name: kafka
environment:
CLUSTER_ID: MkU3OEVBNTcwNTJENDM2Qk
KAFKA_ADVERTISED_LISTENERS: 'INTERNAL://kafka:29092,EXTERNAL://localhost:9092'
KAFKA_AUTO_CREATE_TOPICS_ENABLE: false
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@kafka:29093'
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_INTER_BROKER_LISTENER_NAME: 'INTERNAL'
KAFKA_LISTENERS: 'INTERNAL://kafka:29092,CONTROLLER://kafka:29093,EXTERNAL://0.0.0.0:9092'
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT'
KAFKA_LOG_DIRS: '/tmp/kraft-combined-logs'
KAFKA_NODE_ID: 1
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_PROCESS_ROLES: 'broker,controller'
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
LOG_LEVEL: WARN
healthcheck:
test: kafka-topics --list --bootstrap-server kafka:9092
interval: 1s
retries: 30
image: confluentinc/cp-kafka:7.6.2
ports:
- 9092:9092
router:
build:
context: .
tags:
- router:latest
container_name: router
depends_on:
init:
condition: service_completed_successfully
environment:
KAFKA_CONSUMER_AUTO_OFFSET_RESET: earliest
KAFKA_CONSUMER_BOOTSTRAP_SERVERS: kafka:29092
KAFKA_CONSUMER_CLIENT_ID: kafka_router
KAFKA_CONSUMER_ENABLE_AUTO_COMMIT: false
KAFKA_CONSUMER_GROUP_ID: kafka_router_1
KAFKA_PRODUCER_BOOTSTRAP_SERVERS: kafka:29092
KAFKA_ROUTER_DLQ_TOPIC_NAME: 'router.dlq'
KAFKA_ROUTER_PROMETHEUS_PREFIX: "docker_"
KAFKA_ROUTER_RULE_BOTH_GB_AND_IE: '{"destination_topics":"GB.output.json,IE.output.json","source_topic":"both.json"}'
KAFKA_ROUTER_RULE_COUNTRY_IE_VAT_NUMBER: '{"destination_topics":"IE.output.json","jmespath":"vat_number","regexp":"^IE","source_topic":"input.json"}'
KAFKA_ROUTER_RULE_COUNTRY_IS_FR: '{"destination_topics":"","jmespath":"country","regexp":"^FR$","source_topic":"input.json"}'
KAFKA_ROUTER_RULE_COUNTRY_IS_GB: '{"destination_topics":"GB.output.json","jmespath":"country","regexp":"^GB$","source_topic":"input.json"}'
KAFKA_ROUTER_RULE_COUNTRY_IS_IE: '{"destination_topics":"IE.output.json","jmespath":"country","regexp":"^IE$","source_topic":"input.json"}'
KAFKA_ROUTER_RULE_COUNTRY_UK_VAT_NUMBER: '{"destination_topics":"GB.output.json","jmespath":"vat_number","regexp":"^GB","source_topic":"input.json"}'
LOG_LEVEL: DEBUG
SENTRY_DSN: "${SENTRY_DSN:-}"
SENTRY_ENABLE_TRACING: "True"
SENTRY_ENVIRONMENT: "docker"
SENTRY_SAMPLE_RATE: 1.0
ports:
- 8000:8000
doomed:
build:
context: .
tags:
- router:latest
container_name: doomed
depends_on:
init:
condition: service_completed_successfully
environment:
KAFKA_CONSUMER_AUTO_OFFSET_RESET: earliest
KAFKA_CONSUMER_BOOTSTRAP_SERVERS: kafka:29092
KAFKA_CONSUMER_CLIENT_ID: kafka_router
KAFKA_CONSUMER_ENABLE_AUTO_COMMIT: false
KAFKA_CONSUMER_GROUP_ID: kafka_router_2
KAFKA_PRODUCER_BOOTSTRAP_SERVERS: kafka:29092
KAFKA_PRODUCER_DELIVERY_TIMEOUT_MS: 20000
KAFKA_PRODUCER_LINGER_MS: 5000
KAFKA_PRODUCER_REQUEST_TIMEOUT_MS: 15000
KAFKA_ROUTER_PROMETHEUS_PORT: 8001
KAFKA_ROUTER_DLQ_TOPIC_NAME: 'router.dlq'
KAFKA_ROUTER_RULE_DOOMED_DO_FAIL: '{"destination_topics":"non_existent","source_topic":"input.json"}'
KAFKA_ROUTER_PROMETHEUS_PREFIX: "docker_"
LOG_LEVEL: DEBUG
SENTRY_ENABLE_TRACING: "True"
SENTRY_ENVIRONMENT: "docker"
SENTRY_SAMPLE_RATE: 1.0
ports:
- 8001:8001