version: '3.9'

services:
  cassandra:
    image: cassandra:4.0
    ports:
      - 9042:9042
    volumes:
      - ./local_data:/var/lib/cassandra
    environment:
      - MAX_HEAP_SIZE=512M
      - HEAP_NEWSIZE=100M
      - CASSANDRA_CLUSTER_NAME=ada-cassandra
      - CASSANDRA_DC=ada-dc1
      - CASSANDRA_RACK=ada-rack1
      - CASSANDRA_ENDPOINT_SNITCH=GossipingPropertyFileSnitch
      - CASSANDRA_AUTHENTICATOR=PasswordAuthenticator
      # - CASSANDRA_AUTHORIZER=CassandraAuthorizer
      # - CASSANDRA_NETWORK_AUTHORIZER=CassandraNetworkAuthorizer