version: '2' services: cassandra: image: docker.io/bitnami/cassandra:3-debian-10 volumes: - cassandra_data:/bitnami environment: - CASSANDRA_SEEDS=cassandra,cassandra2 - CASSANDRA_CLUSTER_NAME=cassandra-cluster - CASSANDRA_PASSWORD_SEEDER=yes - CASSANDRA_USER=kong - CASSANDRA_PASSWORD=kong # By default, Cassandra autodetects the available host memory and takes as much as it can. # Therefore, memory options are mandatory if multiple Cassandras are launched in the same node. - MAX_HEAP_SIZE=2G - HEAP_NEWSIZE=200M cassandra2: image: docker.io/bitnami/cassandra:3-debian-10 volumes: - cassandra2_data:/bitnami environment: - CASSANDRA_SEEDS=cassandra,cassandra2 - CASSANDRA_CLUSTER_NAME=cassandra-cluster - CASSANDRA_USER=kong - CASSANDRA_PASSWORD=kong # By default, Cassandra autodetects the available host memory and takes as much as it can. # Therefore, memory options are mandatory if multiple Cassandras are launched in the same node. - MAX_HEAP_SIZE=2G - HEAP_NEWSIZE=200M kong: image: docker.io/bitnami/kong:2-debian-10 ports: - 18000:8000 - 18443:8443 environment: - KONG_MIGRATE=yes - KONG_DATABASE=cassandra - KONG_CASSANDRA_CONTACT_POINTS=cassandra,cassandra2 - KONG_CASSANDRA_PASSWORD=kong # See NGINX worker_processes setting at http://nginx.org/en/docs/ngx_core_module.html#worker_processes # If in doubt, set to the amount of CPU cores divided by the number of Kong/Cassandra nodes in the machine - KONG_NGINX_WORKER_PROCESSES=2 kong2: image: docker.io/bitnami/kong:2-debian-10 ports: - 28000:8000 - 28443:8443 environment: - KONG_DATABASE=cassandra - KONG_CASSANDRA_CONTACT_POINTS=cassandra,cassandra2 - KONG_CASSANDRA_PASSWORD=kong # See NGINX worker_processes setting at http://nginx.org/en/docs/ngx_core_module.html#worker_processes # If in doubt, set to the amount of CPU cores divided by the number of Kong/Cassandra nodes in the machine - KONG_NGINX_WORKER_PROCESSES=2 volumes: cassandra_data: driver: local cassandra2_data: driver: local