2024-07-24 15:03:39 +02:00
|
|
|
services:
|
|
|
|
cassandra1:
|
2024-07-24 18:05:37 +02:00
|
|
|
build: .
|
2024-07-24 15:03:39 +02:00
|
|
|
container_name: cassandra1
|
|
|
|
env_file:
|
|
|
|
- .env
|
|
|
|
environment:
|
|
|
|
- CASSANDRA_BROADCAST_ADDRESS=cassandra1
|
2024-07-24 15:41:02 +02:00
|
|
|
- CASSANDRA_LISTEN_ADDRESS=cassandra1
|
|
|
|
- CASSANDRA_RPC_ADDRESS=cassandra1
|
|
|
|
- CASSANDRA_DC=DC1
|
|
|
|
- CASSANDRA_RACK=RAC1
|
2024-07-24 15:03:39 +02:00
|
|
|
- PRIMARY_NODE=true
|
|
|
|
volumes:
|
2024-07-30 17:03:33 +02:00
|
|
|
- ./scripts:/scripts
|
|
|
|
- ./data/dumps/node1:/dump/snapshot
|
|
|
|
- ./data/dumps/schema:/dump/schema
|
2024-07-24 15:03:39 +02:00
|
|
|
- ./data/volumes/node1:/var/lib/cassandra
|
2024-08-01 11:25:40 +02:00
|
|
|
- ./data/logs/node1:/var/log/cassandra
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD-SHELL", "nodetool status"]
|
|
|
|
interval: 2m
|
|
|
|
start_period: 2m
|
|
|
|
timeout: 10s
|
|
|
|
retries: 3
|
2024-07-24 15:03:39 +02:00
|
|
|
ports:
|
|
|
|
- "9042:9042"
|
|
|
|
networks:
|
|
|
|
- cassandra-net
|
2024-08-01 11:25:40 +02:00
|
|
|
restart:
|
|
|
|
on-failure
|
|
|
|
|
2024-07-24 15:03:39 +02:00
|
|
|
|
|
|
|
cassandra2:
|
2024-07-24 18:05:37 +02:00
|
|
|
build: .
|
2024-07-24 15:03:39 +02:00
|
|
|
container_name: cassandra2
|
|
|
|
env_file:
|
|
|
|
- .env
|
|
|
|
environment:
|
|
|
|
- CASSANDRA_BROADCAST_ADDRESS=cassandra2
|
2024-07-24 15:41:02 +02:00
|
|
|
- CASSANDRA_LISTEN_ADDRESS=cassandra2
|
|
|
|
- CASSANDRA_RPC_ADDRESS=cassandra2
|
|
|
|
- CASSANDRA_DC=DC1
|
|
|
|
- CASSANDRA_RACK=RAC1
|
2024-07-24 15:03:39 +02:00
|
|
|
- PRIMARY_NODE=false
|
2024-08-01 11:25:40 +02:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD-SHELL", "nodetool status"]
|
|
|
|
interval: 2m
|
|
|
|
start_period: 2m
|
|
|
|
timeout: 10s
|
|
|
|
retries: 3
|
2024-07-24 15:03:39 +02:00
|
|
|
volumes:
|
2024-07-30 17:03:33 +02:00
|
|
|
- ./scripts:/scripts
|
|
|
|
- ./data/dumps/node2:/dump/snapshot
|
|
|
|
- ./data/dumps/schema:/dump/schema
|
2024-07-24 15:03:39 +02:00
|
|
|
- ./data/volumes/node2:/var/lib/cassandra
|
2024-08-01 11:25:40 +02:00
|
|
|
- ./data/logs/node2:/var/log/cassandra
|
2024-07-24 15:03:39 +02:00
|
|
|
networks:
|
|
|
|
- cassandra-net
|
2024-07-24 18:05:37 +02:00
|
|
|
depends_on:
|
2024-08-01 11:25:40 +02:00
|
|
|
cassandra1:
|
|
|
|
condition: service_healthy
|
|
|
|
restart:
|
|
|
|
on-failure
|
2024-07-24 15:03:39 +02:00
|
|
|
|
|
|
|
cassandra3:
|
2024-07-24 18:05:37 +02:00
|
|
|
build: .
|
2024-07-24 15:03:39 +02:00
|
|
|
container_name: cassandra3
|
|
|
|
env_file:
|
|
|
|
- .env
|
|
|
|
environment:
|
|
|
|
- CASSANDRA_BROADCAST_ADDRESS=cassandra3
|
2024-07-24 15:41:02 +02:00
|
|
|
- CASSANDRA_LISTEN_ADDRESS=cassandra3
|
|
|
|
- CASSANDRA_RPC_ADDRESS=cassandra3
|
|
|
|
- CASSANDRA_DC=DC1
|
|
|
|
- CASSANDRA_RACK=RAC1
|
2024-07-24 15:03:39 +02:00
|
|
|
- PRIMARY_NODE=false
|
2024-08-01 11:25:40 +02:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD-SHELL", "nodetool status"]
|
|
|
|
interval: 2m
|
|
|
|
start_period: 2m
|
|
|
|
timeout: 10s
|
|
|
|
retries: 3
|
2024-07-24 15:03:39 +02:00
|
|
|
volumes:
|
2024-07-30 17:03:33 +02:00
|
|
|
- ./scripts:/scripts
|
|
|
|
- ./data/dumps/node3:/dump/snapshot
|
|
|
|
- ./data/dumps/schema:/dump/schema
|
2024-07-24 15:03:39 +02:00
|
|
|
- ./data/volumes/node3:/var/lib/cassandra
|
2024-08-01 11:25:40 +02:00
|
|
|
- ./data/logs/node3:/var/log/cassandra
|
2024-07-24 15:03:39 +02:00
|
|
|
networks:
|
|
|
|
- cassandra-net
|
2024-07-24 18:05:37 +02:00
|
|
|
depends_on:
|
2024-08-01 11:25:40 +02:00
|
|
|
cassandra2:
|
|
|
|
condition: service_healthy
|
|
|
|
restart:
|
|
|
|
on-failure
|
|
|
|
|
|
|
|
|
2024-07-24 15:03:39 +02:00
|
|
|
|
|
|
|
networks:
|
|
|
|
cassandra-net:
|
|
|
|
driver: bridge
|