110 lines
2.7 KiB
YAML
110 lines
2.7 KiB
YAML
services:
|
|
scylla-node1:
|
|
image: scylladb/scylla:4.5.6
|
|
command: --listen-address=172.20.0.10 --smp=1
|
|
ports:
|
|
- 9042:9042
|
|
networks:
|
|
scylla_cluster:
|
|
ipv4_address: 172.20.0.10
|
|
deploy:
|
|
restart_policy:
|
|
condition: on-failure
|
|
delay: 10s
|
|
max_attempts: 10
|
|
window: 30s
|
|
resources:
|
|
limits:
|
|
cpus: '4'
|
|
reservations:
|
|
cpus: '0.1'
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "[ $$(nodetool statusgossip) = running ]"]
|
|
interval: 30s
|
|
timeout: 20s
|
|
retries: 10
|
|
start_period: 120s
|
|
volumes:
|
|
- scylla-node1-data:/var/lib/scylla
|
|
- ./scylla.yaml:/etc/scylla/scylla.yaml
|
|
- ./cassandra-rackdc.properties:/etc/scylla/cassandra-rackdc.properties
|
|
|
|
scylla-node2:
|
|
image: scylladb/scylla:4.5.6
|
|
command: --seeds=scylla-node1,scylla-node3 --listen-address=172.20.0.11 --smp=1
|
|
ports:
|
|
- 9043:9042
|
|
networks:
|
|
scylla_cluster:
|
|
ipv4_address: 172.20.0.11
|
|
deploy:
|
|
restart_policy:
|
|
condition: on-failure
|
|
delay: 10s
|
|
max_attempts: 10
|
|
window: 30s
|
|
resources:
|
|
limits:
|
|
cpus: '4'
|
|
reservations:
|
|
cpus: '0.1'
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "[ $$(nodetool statusgossip) = running ]"]
|
|
interval: 30s
|
|
timeout: 20s
|
|
retries: 10
|
|
start_period: 120s
|
|
depends_on:
|
|
scylla-node1:
|
|
condition: service_healthy
|
|
volumes:
|
|
- scylla-node2-data:/var/lib/scylla
|
|
- ./scylla.yaml:/etc/scylla/scylla.yaml
|
|
- ./cassandra-rackdc.properties:/etc/scylla/cassandra-rackdc.properties
|
|
|
|
scylla-node3:
|
|
image: scylladb/scylla:4.5.6
|
|
command: --seeds=scylla-node1 --listen-address=172.20.0.12 --smp=1
|
|
ports:
|
|
- 9044:9042
|
|
networks:
|
|
scylla_cluster:
|
|
ipv4_address: 172.20.0.12
|
|
deploy:
|
|
restart_policy:
|
|
condition: on-failure
|
|
delay: 10s
|
|
max_attempts: 10
|
|
window: 30s
|
|
resources:
|
|
limits:
|
|
cpus: '4'
|
|
reservations:
|
|
cpus: '0.1'
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "[ $$(nodetool statusgossip) = running ]"]
|
|
interval: 30s
|
|
timeout: 20s
|
|
retries: 10
|
|
start_period: 120s
|
|
depends_on:
|
|
scylla-node1:
|
|
condition: service_healthy
|
|
scylla-node2:
|
|
condition: service_started
|
|
volumes:
|
|
- scylla-node3-data:/var/lib/scylla
|
|
- ./scylla.yaml:/etc/scylla/scylla.yaml
|
|
- ./cassandra-rackdc.properties:/etc/scylla/cassandra-rackdc.properties
|
|
|
|
volumes:
|
|
scylla-node1-data:
|
|
scylla-node2-data:
|
|
scylla-node3-data:
|
|
|
|
networks:
|
|
scylla_cluster:
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 172.20.0.0/24 |