version: '2'
services:

  cassandra:
    image: cassandra:3.11.6
    ports:
      - 7000:7000
      - 7001:7001
      - 7199:7199
      - 9042:9042
      - 9160:9160
    environment:
      CASSANDRA_DC: dc1
      CASSANDRA_RACK: rack1
      CASSANDRA_ENDPOINT_SNITCH: GossipingPropertyFileSnitch
      CASSANDRA_CLUSTER_NAME: spring_demo_cluster
      CASSANDRA_NUM_TOKENS: 1  
    volumes:
      - ~/docker-volumes/cassandra3-single-node/:/var/lib/cassandra/data
    ulimits:
      memlock: -1