Created
February 4, 2020 11:43
-
-
Save mikla/85750c31fc2ba192707b059138cd5e5e to your computer and use it in GitHub Desktop.
cassandra cluster docker compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services... | |
| cassandra-seed: | |
| container_name: cassandra-seed-node | |
| image: cassandra:3.11.0 | |
| ports: | |
| - "9042:9042" # Native transport | |
| - "7199:7199" # JMX | |
| - "9160:9160" # Thrift clients | |
| cassandra-node-1: | |
| image: cassandra:3.11.0 | |
| command: /bin/bash -c "echo 'Waiting for seed node' && sleep 30 && /docker-entrypoint.sh cassandra -f" | |
| environment: | |
| - "CASSANDRA_SEEDS=cassandra-seed-node" | |
| depends_on: | |
| - "cassandra-seed" | |
| # you cannot have multiple nodes join the cluster at the same time when | |
| # cassandra.consistent.rangemovement is true so we further delay it to give it time to stabilize | |
| cassandra-node-2: | |
| image: cassandra:3.11.0 | |
| command: /bin/bash -c "echo 'Waiting for seed node' && sleep 80 && /docker-entrypoint.sh cassandra -f" | |
| environment: | |
| - "CASSANDRA_SEEDS=cassandra-seed-node" | |
| depends_on: | |
| - "cassandra-seed" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment