-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
81 lines (77 loc) · 2.29 KB
/
docker-compose.yml
File metadata and controls
81 lines (77 loc) · 2.29 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
services:
## EXTERNAL SERVICES FOR TUTORIAL
# "external" NATS Jetstream server used for demo exercises
external-jetstream:
image: nats:2.8.4-alpine3.15
volumes:
- ./resources/external-jetstream:/conf
command: "--config=/conf/nats-server.conf"
ports:
- "4224:4224"
healthcheck:
test: ["CMD", "nc", "-zv", "0.0.0.0", "4224"]
interval: "2s"
timeout: "5s"
retries: 3
start_period: "2s"
profiles:
- demo
# configures the "external" NATS Jetstream server used in the demo
configure-external-jetstream:
image: natsio/nats-box:latest
volumes:
- ./resources/external-jetstream:/conf
profiles:
- demo
depends_on:
- external-jetstream
entrypoint: "nats"
command: "stream add --server external-jetstream:4224 --config /conf/external-stream.conf"
# "external" Kafka and Zookeeper servers used in the demo examples
external-zookeeper:
image: 'bitnami/zookeeper:latest'
ports:
- '2181:2181'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
profiles:
- demo
external-kafka:
image: 'bitnami/kafka:latest'
ports:
- "9092:9092"
- "9093:9093"
environment:
- KAFKA_CFG_ZOOKEEPER_CONNECT=external-zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENERS=EXTERNAL://:9092,INTERNAL://:9093
- KAFKA_CFG_ADVERTISED_LISTENERS=EXTERNAL://external-kafka:9092,INTERNAL://localhost:9093
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME=EXTERNAL
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=EXTERNAL:PLAINTEXT,INTERNAL:PLAINTEXT
healthcheck:
test: ["CMD", "/opt/bitnami/common/bin/wait-for-port", "9092"]
start_period: 15s
interval: 10s
timeout: 10s
retries: 4
depends_on:
- external-zookeeper
profiles:
- demo
volumes:
- ./resources/external-kafka:/opt/scripts
## HealthOS CORE SERVICES
# the HealthOS Jetstream instances used for "core" messaging
healthos-core-jetstream:
image: nats:2.8.4-alpine3.15
volumes:
- ./resources/core-jetstream:/conf
command: "--config=/conf/nats-server.conf"
ports:
- "4222:4222"
healthcheck:
test: ["CMD", "nc", "-zv", "0.0.0.0", "4222"]
interval: "2s"
timeout: "5s"
retries: 3
start_period: "2s"