-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcassandra4-1-server-cluster-docker-compose.yml
37 lines (33 loc) · 1.36 KB
/
cassandra4-1-server-cluster-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
# Latest version of the Docker-compose language to this date
version: '3.9'
# The virtual network all the nodes will be into - let Docker organize everything
# Though you can set up networks manually if you need correlation between nodes and IPs, for instance...
networks:
cassandra4-single-cluster-network:
services:
cassandra4-single-cluster-server-1:
# Feel free to fix the versions
image: cassandra:4.1
container_name: cassandra4-single-cluster-server-1
hostname: cassandra4-single-cluster-server-1
healthcheck:
test: ["CMD", "cqlsh", "-e", "describe keyspaces" ]
interval: 10s
timeout: 10s
retries: 10
networks:
- cassandra4-single-cluster-network
ports:
# Native port of Cassandra
- "9042:9042"
volumes:
- ./docker-volumes/cassandra4-single-cluster-server-1:/var/lib/cassandra
# Declare and save environments variables into "environment"
environment: &environment
# The first two nodes will be seeds
CASSANDRA_SEEDS: "cassandra4-single-cluster-server-1"
CASSANDRA_CLUSTER_NAME: CassandraPW
CASSANDRA_DC: Mars
CASSANDRA_RACK: West
CASSANDRA_ENDPOINT_SNITCH: GossipingPropertyFileSnitch
CASSANDRA_NUM_TOKENS: 128