-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.yml
62 lines (58 loc) · 1.68 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
services:
cassandra-service:
image: cassandra:latest
ports:
- "9042:9042"
volumes:
# This configuration is customized to enable materialized views.
- ${PWD}/docker-files/cassandra.yaml:/etc/cassandra/cassandra.yaml
healthcheck:
test: ["CMD", "cqlsh", "-e", "describe keyspaces"]
interval: 5s
timeout: 5s
retries: 60
cassandra3-service:
image: cassandra:3
ports:
- "9042:9042"
healthcheck:
test: ["CMD", "cqlsh", "-e", "describe keyspaces"]
interval: 5s
timeout: 5s
retries: 60
cassandra2-service:
image: cassandra:2
ports:
- "9042:9042"
volumes:
- ${PWD}/docker-files/cassandra2.yaml:/etc/cassandra/cassandra.yaml
healthcheck:
test: ["CMD", "cqlsh", "-e", "describe keyspaces"]
interval: 5s
timeout: 5s
retries: 60
# These exists to force the condition of having the Cassandra service is up before starting the tests.
# The healthcheck above is not enough because it does not provide a condition to wait for the service
# to be up. And this is simpler than installing cqlsh and using it to check the service status on the
# CI server. This uses alpine since it is a pretty small image.
cassandra-latest:
image: alpine:latest
depends_on:
cassandra-service:
condition: service_healthy
cassandra3:
image: alpine:latest
depends_on:
cassandra3-service:
condition: service_healthy
cassandra2:
image: alpine:latest
depends_on:
cassandra2-service:
condition: service_healthy
dse:
image: datastax/dse-server
environment:
- DS_LICENSE=accept
ports:
- "9043:9042"