forked from tubular/sparkly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
102 lines (94 loc) · 2.62 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
101
102
#
# Copyright 2017 Tubular Labs, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
version: '2.1'
services:
dev:
build: .
depends_on:
cassandra.docker:
condition: service_healthy
elastic.docker:
condition: service_healthy
kafka.docker:
condition: service_healthy
mysql.docker:
condition: service_healthy
redis.docker:
condition: service_healthy
volumes:
- .:/opt/sparkly/
test:
build: .
depends_on:
cassandra.docker:
condition: service_healthy
elastic.docker:
condition: service_healthy
kafka.docker:
condition: service_healthy
mysql.docker:
condition: service_healthy
redis.docker:
condition: service_healthy
cassandra.docker:
image: cassandra:4.1
healthcheck:
test: ["CMD-SHELL", "[ $$(nodetool statusgossip) = running ]"]
elastic.docker:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.8
environment:
- xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- discovery.type=single-node
healthcheck:
test: "curl -f http://localhost:9200/_cat/health | grep green"
interval: 5s
timeout: 5s
retries: 20
mysql.docker:
image: mysql:8.0
environment:
MYSQL_DATABASE: sparkly_test
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
kafka.docker:
image: confluentinc/cp-kafka:7.3.0
depends_on:
zookeeper.docker:
condition: service_healthy
expose:
- "9092"
environment:
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://:9092
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
KAFKA_ZOOKEEPER_CONNECT: zookeeper.docker:2181
KAFKA_NUM_PARTITIONS: 3
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
healthcheck:
test: ps ax | grep kafka
redis.docker:
image: redis:7.0
expose:
- "6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
zookeeper.docker:
image: confluent/zookeeper
expose:
- "2181"
healthcheck:
test: ps ax | grep zookeeper