Skip to content

Instantly share code, notes, and snippets.

@tzach
Created March 16, 2023 20:46
Show Gist options
  • Save tzach/4d2c2485945465459e3c74cc5d42d949 to your computer and use it in GitHub Desktop.
Save tzach/4d2c2485945465459e3c74cc5d42d949 to your computer and use it in GitHub Desktop.
docker-compose.yml for starting a 3 node scylla cluster
version: "3"
services:
scylla-node1:
container_name: scylla-node1
image: scylladb/scylla:5.1.0
restart: always
command: --seeds=scylla-node1 --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0
volumes:
- "./scylla/scylla.yaml:/etc/scylla/scylla.yaml"
- "./scylla/cassandra-rackdc.properties.dc1:/etc/scylla/cassandra-rackdc.properties"
- "./scylla/mutant-data.txt:/mutant-data.txt"
networks:
web:
healthcheck:
test: cqlsh -e "SHOW VERSION" || exit 1
interval: 15s
retries: 10
start_period: 30s
timeout: 30s
scylla-node2:
container_name: scylla-node2
image: scylladb/scylla:5.1.0
restart: always
command: --seeds=scylla-node1 --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0
volumes:
- "./scylla/scylla.yaml:/etc/scylla/scylla.yaml"
- "./scylla/cassandra-rackdc.properties.dc1:/etc/scylla/cassandra-rackdc.properties"
networks:
web:
healthcheck:
test: cqlsh -e "SHOW VERSION" || exit 1
interval: 15s
retries: 10
start_period: 30s
timeout: 30s
depends_on:
scylla-node1:
condition: service_healthy
scylla-node3:
container_name: scylla-node3
image: scylladb/scylla:5.1.0
restart: always
command: --seeds=scylla-node1 --smp 1 --memory 750M --overprovisioned 1 --api-address 0.0.0.0
volumes:
- "./scylla/scylla.yaml:/etc/scylla/scylla.yaml"
- "./scylla/cassandra-rackdc.properties.dc1:/etc/scylla/cassandra-rackdc.properties"
networks:
web:
healthcheck:
test: cqlsh -e "SHOW VERSION" || exit 1
interval: 15s
retries: 10
start_period: 30s
timeout: 30s
depends_on:
scylla-node2:
condition: service_healthy
networks:
web:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment