-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.stream.yml
57 lines (55 loc) · 1.92 KB
/
docker-compose.stream.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
version: '3.5'
name: pokeshop
services:
stream:
image: confluentinc/cp-kafka:latest-ubi8
ports:
- 29092:29092
environment:
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://stream:9092,PLAINTEXT_HOST://127.0.0.1:29092
- KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093,PLAINTEXT_HOST://:29092
- [email protected]:9093
- KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
- KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS=0
- KAFKA_PROCESS_ROLES=controller,broker
- KAFKA_NODE_ID=1
- KAFKA_METADATA_LOG_SEGMENT_MS=15000
- KAFKA_METADATA_MAX_RETENTION_MS=60000
- KAFKA_METADATA_LOG_MAX_RECORD_BYTES_BETWEEN_SNAPSHOTS=2800
- KAFKA_AUTO_CREATE_TOPICS_ENABLE=true
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
- KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1
- KAFKA_HEAP_OPTS=-Xmx200m -Xms200m
- CLUSTER_ID=ckjPoprWQzOf0-FuNkGfFQ
healthcheck:
test: nc -z stream 9092
start_period: 10s
interval: 5s
timeout: 10s
retries: 10
streaming-worker:
build: .
environment:
DATABASE_URL: postgresql://ashketchum:squirtle123@db:5432/pokeshop?schema=public
POKE_API_BASE_URL: https://pokeapi.co/api/v2
COLLECTOR_ENDPOINT: http://otel-collector:4317
ZIPKIN_URL: http://localhost:9411
NPM_RUN_COMMAND: stream-worker
KAFKA_BROKER: 'stream:9092'
KAFKA_TOPIC: 'pokemon'
KAFKA_CLIENT_ID: 'streaming-worker'
REDIS_URL: cache
SERVICE_NAME: pokeshop-streaming-worker
restart: on-failure
depends_on:
db:
condition: service_healthy
stream:
condition: service_healthy
jaeger:
condition: service_healthy
cache:
condition: service_healthy
otel-collector:
condition: service_started