forked from JasonGiedymin/docker-cassandra-cluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
37 lines (35 loc) · 1.05 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
# docker-compose Cassandra Test Cluster
# docker-compose rm
# docker-compose up
# docker run -it --link cassandra_cassandra-1_1:cassandra --rm cassandra cqlsh cassandra
# copy paste the test script on cassandra-1
# run select on cassandra-2
#
cassandra-1:
hostname: cassandra-1
image: cassandra:latest
command: /bin/bash -c "sleep 1 && echo ' -- Pausing to let system catch up ... -->' && /docker-entrypoint.sh cassandra -f"
expose:
- 7000
- 7001
- 7199
- 9042
- 9160
# volumes: # uncomment if you desire mounts, also uncomment cluster.sh
# - ./data/cassandra-1:/var/lib/cassandra:rw
cassandra-2:
hostname: cassandra-2
image: cassandra:latest
command: /bin/bash -c "sleep 30 && echo ' -- Pausing to let system catch up ... -->' && /docker-entrypoint.sh cassandra -f"
environment:
- CASSANDRA_SEEDS=cassandra-1
links:
- cassandra-1
expose:
- 7000
- 7001
- 7199
- 9042
- 9160
# volumes: # uncomment if you desire mounts, also uncomment cluster.sh
# - ./data/cassandra-2:/var/lib/cassandra:rw