Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Extarys/bce71d6e2b0ab6b9b8509818c5243819 to your computer and use it in GitHub Desktop.
Save Extarys/bce71d6e2b0ab6b9b8509818c5243819 to your computer and use it in GitHub Desktop.
version: '3'
services:
cassandra-1:
hostname: cassandra-1
image: cassandra:latest
restart: always
command: /bin/bash -c "sleep 1 && echo ' -- Pausing to let system catch up ... -->' && /docker-entrypoint.sh cassandra -f"
environment:
- CASSANDRA_BROADCAST_ADDRESS=cassandra-1
- MAX_HEAP_SIZE=4096M
- HEAP_NEWSIZE=4096M
- CASSANDRA_DC=DC1
- CASSANDRA_ENDPOINT_SNITCH=GossipingPropertyFileSnitch
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
restart: always
command: /bin/bash -c "sleep 30 && echo ' -- Pausing to let system catch up ... -->' && /docker-entrypoint.sh cassandra -f"
environment:
- CASSANDRA_SEEDS=cassandra-1
- CASSANDRA_BROADCAST_ADDRESS=cassandra-2
- MAX_HEAP_SIZE=4096M
- HEAP_NEWSIZE=4096M
- CASSANDRA_DC=DC1
- CASSANDRA_ENDPOINT_SNITCH=GossipingPropertyFileSnitch
links:
- cassandra-1
expose:
- 7000
- 7001
- 7199
- 9042
- 9160
volumes: # uncomment if you desire mounts, also uncomment cluster.sh
- /media/DarkHawk/srv/Databases/Cassandra-Docker/data/cassandra-2:/var/lib/cassandra:rw
cassandra-3:
hostname: cassandra-3
image: cassandra:latest
restart: always
command: /bin/bash -c "sleep 45 && echo ' -- Pausing to let system catch up ... -->' && /docker-entrypoint.sh cassandra -f"
environment:
- CASSANDRA_SEEDS=cassandra-1
- CASSANDRA_BROADCAST_ADDRESS=cassandra-3
- MAX_HEAP_SIZE=4096M
- HEAP_NEWSIZE=4096M
- CASSANDRA_DC=DC1
- CASSANDRA_ENDPOINT_SNITCH=GossipingPropertyFileSnitch
links:
- cassandra-1
- cassandra-2
expose:
- 7000
- 7001
- 7199
- 9042
- 9160
volumes: # uncomment if you desire mounts, also uncomment cluster.sh
- ./data/cassandra-3:/var/lib/cassandra:rw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment