-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
104 lines (96 loc) · 2.44 KB
/
compose.yaml
File metadata and controls
104 lines (96 loc) · 2.44 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
services:
testrunner:
image: $DEV_IMAGE_TAG
build:
dockerfile: Dockerfile.dev
context: .
args:
OTP_VERSION: $OTP_VERSION
THRIFT_VERSION: $THRIFT_VERSION
volumes:
- .:$PWD
hostname: $SERVICE_NAME
working_dir: $PWD
depends_on:
riakdb:
condition: service_started
member1:
condition: service_started
member2:
condition: service_started
kafka1:
condition: service_healthy
consul0:
condition: service_started
consul1:
condition: service_started
consul2:
condition: service_started
ports:
- "8022"
command: /sbin/init
riakdb: &member-node
image: docker.io/basho/riak-kv:${RIAK_VERSION}
environment:
- CLUSTER_NAME=riakkv
- COORDINATOR_NODE=riakdb
labels:
- "com.basho.riak.cluster.name=riakkv"
volumes:
- ./test_resources/riak_user.conf:/etc/riak/user.conf:ro
- schemas:/etc/riak/schemas
member1:
<<: *member-node
links:
- riakdb
depends_on:
- riakdb
member2:
<<: *member-node
links:
- riakdb
depends_on:
- riakdb
zookeeper:
image: docker.io/confluentinc/cp-zookeeper:${ZOOKEEPER_VERSION}
healthcheck:
test: echo ruok | nc 127.0.0.1 2181 || exit -1
interval: 5s
timeout: 240s #🍎
retries: 50
environment:
KAFKA_OPTS: "-Dzookeeper.4lw.commands.whitelist=ruok"
ZOOKEEPER_CLIENT_PORT: 2181
kafka1: &kafka-broker
image: docker.io/wurstmeister/kafka:${KAFKA_VERSION}
depends_on:
zookeeper:
condition: service_healthy
healthcheck:
test: ["CMD", "kafka-topics.sh", "--list", "--zookeeper", "zookeeper:2181"]
interval: 5s
timeout: 10s
retries: 5
environment:
KAFKA_BROKER_ID: 1
KAFKA_ADVERTISED_LISTENERS: OUTSIDE://kafka1:9092
KAFKA_LISTENERS: OUTSIDE://0.0.0.0:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: OUTSIDE:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: OUTSIDE
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
consul1: &consul-server
image: docker.io/consul:${CONSUL_VERSION}
volumes:
- ./test_resources/consul.json:/etc/consul/consul.json
hostname: consul1
command:
agent -server -config-dir=/etc/consul
consul2:
<<: *consul-server
hostname: consul2
consul0:
<<: *consul-server
hostname: consul0
volumes:
schemas:
external: false