-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (55 loc) · 2.24 KB
/
Copy pathdocker-compose.yml
File metadata and controls
57 lines (55 loc) · 2.24 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
version: "3"
services:
kalix-runtime:
image: registry.akka.io/kalix-runtime:1.2.39
container_name: java-protobuf-customer-registry-kafka-quickstart
# uncomment volumes when persistence is enabled
# volumes:
# - ./target/kalix:/var/kalix
ports:
- "${ADVERTISED_HTTP_PORT}:9000"
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
PERSISTENCE_ENABLED: "false" #when true uncomment volumes above
JAVA_TOOL_OPTIONS: >
-Dkalix.proxy.eventing.support=kafka
# those variables are defined in the .env file
# when running multiple services on your local machine, make sure that
# the ports are unique by editing the corresponding .env files
ADVERTISED_HTTP_PORT: ${ADVERTISED_HTTP_PORT}
USER_SERVICE_HOST: ${USER_SERVICE_HOST}
USER_SERVICE_PORT: ${USER_SERVICE_PORT}
# configuring kafka broker used for eventing
BROKER_SERVERS: kafka:29092
kafka:
image: confluentinc/cp-kafka:7.2.6
depends_on:
- zookeeper
ports:
- 9092:9092 # used when running clients from containerized Kalix Runtime
- 9093:9093 # used when running non-docker clients from host
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
# advertised listener running on port 9092 must be accessible to kalix-runtime service running for integration tests
# therefore we need to use host.docker.internal (docker's bridge address) to access it through the host machine
# advertised listener running on port 9093 is to be used by non-docker clients running on host machine
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:29092,EXTERNAL_DOCKER://host.docker.internal:9092,HOST://localhost:9093
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL_DOCKER:PLAINTEXT,HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
volumes:
- /var/run/docker.sock:/var/run/docker.sock
healthcheck:
test: nc -z localhost 9092 || exit -1
start_period: 10s
interval: 5s
timeout: 10s
retries: 10
zookeeper:
image: zookeeper:3.9
ports:
- "2181:2181"