-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
124 lines (115 loc) · 3.12 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#
# 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
elastic6.docker:
condition: service_healthy
elastic7.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
elastic6.docker:
condition: service_healthy
elastic7.docker:
condition: service_healthy
kafka.docker:
condition: service_healthy
mysql.docker:
condition: service_healthy
redis.docker:
condition: service_healthy
cassandra.docker:
image: cassandra:2.1.13
mem_limit: 500M
memswap_limit: 600M
environment:
MAX_HEAP_SIZE: 500M
HEAP_NEWSIZE: 200M
healthcheck:
test: ps ax | grep cassandra
elastic6.docker:
image: docker.elastic.co/elasticsearch/elasticsearch:6.5.4
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
elastic7.docker:
image: docker.elastic.co/elasticsearch/elasticsearch:7.3.0
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:5.7
environment:
MYSQL_DATABASE: sparkly_test
MYSQL_USER: root
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
healthcheck:
test: ps ax | grep mysql
kafka.docker:
image: confluent/kafka
depends_on:
zookeeper.docker:
condition: service_healthy
expose:
- "9092"
environment:
KAFKA_ADVERTISED_HOST_NAME: kafka.docker
KAFKA_ADVERTISED_PORT: 9092
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
KAFKA_ZOOKEEPER_CONNECT: zookeeper.docker:2181
KAFKA_NUM_PARTITIONS: 3
healthcheck:
test: ps ax | grep kafka
redis.docker:
image: redis:3.2.4
expose:
- 6379
healthcheck:
test: ps ax | grep redis
zookeeper.docker:
image: confluent/zookeeper
expose:
- "2181"
healthcheck:
test: ps ax | grep zookeeper