Skip to content

Commit

Permalink
docker-compose: Store cassandra db in tmpfs (#830)
Browse files Browse the repository at this point in the history
  • Loading branch information
rukai committed Sep 28, 2022
1 parent 9aa0cd2 commit ab63447
Show file tree
Hide file tree
Showing 14 changed files with 53 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ services:
CASSANDRA_ENABLE_USER_DEFINED_FUNCTIONS: "true"
CASSANDRA_INIT_MAX_RETRIES: "500"
CASSANDRA_INIT_SLEEP_TIME: "1"
volumes:
&volumes
- type: tmpfs
target: /bitnami/cassandra

cassandra-two:
image: *image
Expand All @@ -46,6 +50,7 @@ services:
environment:
<<: *environment
CASSANDRA_RACK: rack2
volumes: *volumes

cassandra-three:
image: *image
Expand All @@ -56,3 +61,4 @@ services:
environment:
<<: *environment
CASSANDRA_RACK: rack3
volumes: *volumes
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ services:
&volumes
- ../cassandra-tls/certs/keystore.p12:/bitnami/cassandra/secrets/keystore
- ../cassandra-tls/certs/truststore.p12:/bitnami/cassandra/secrets/truststore
- type: tmpfs
target: /bitnami/cassandra

cassandra-two:
image: *image
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ services:
CASSANDRA_ENABLE_USER_DEFINED_FUNCTIONS: "true"
CASSANDRA_INIT_MAX_RETRIES: "500"
CASSANDRA_INIT_SLEEP_TIME: "1"
volumes:
&volumes
- type: tmpfs
target: /bitnami/cassandra

cassandra-two:
image: *image
Expand All @@ -44,6 +48,7 @@ services:
ipv4_address: 172.16.1.3
healthcheck: *healthcheck
environment: *environment
volumes: *volumes

cassandra-three:
image: *image
Expand All @@ -52,3 +57,4 @@ services:
ipv4_address: 172.16.1.4
healthcheck: *healthcheck
environment: *environment
volumes: *volumes
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ services:
CASSANDRA_INIT_MAX_RETRIES: "500"
CASSANDRA_INIT_SLEEP_TIME: "1"
CASSANDRA_CQL_PORT_NUMBER: 9044
volumes:
&volumes
- type: tmpfs
target: /bitnami/cassandra

cassandra-two:
image: *image
Expand All @@ -45,6 +49,7 @@ services:
ipv4_address: 172.16.1.3
healthcheck: *healthcheck
environment: *environment
volumes: *volumes

cassandra-three:
image: *image
Expand All @@ -53,3 +58,4 @@ services:
ipv4_address: 172.16.1.4
healthcheck: *healthcheck
environment: *environment
volumes: *volumes
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ services:
MAX_HEAP_SIZE: "400M"
MIN_HEAP_SIZE: "400M"
HEAP_NEWSIZE: "48M"
volumes:
- type: tmpfs
target: /var/lib/cassandra
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ services:
MAX_HEAP_SIZE: "400M"
MIN_HEAP_SIZE: "400M"
HEAP_NEWSIZE: "48M"
volumes:
- type: tmpfs
target: /var/lib/cassandra
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ services:
MAX_HEAP_SIZE: "400M"
MIN_HEAP_SIZE: "400M"
HEAP_NEWSIZE: "48M"
volumes:
- type: tmpfs
target: /var/lib/cassandra
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ services:
MAX_HEAP_SIZE: "400M"
MIN_HEAP_SIZE: "400M"
HEAP_NEWSIZE: "48M"
volumes:
- type: tmpfs
target: /var/lib/cassandra
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ services:
MAX_HEAP_SIZE: "400M"
MIN_HEAP_SIZE: "400M"
HEAP_NEWSIZE: "48M"
volumes:
- type: tmpfs
target: /var/lib/cassandra
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ services:
volumes:
- ./certs/keystore.p12:/bitnami/cassandra/secrets/keystore
- ./certs/truststore.p12:/bitnami/cassandra/secrets/truststore
- type: tmpfs
target: /bitnami/cassandra
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ services:
MAX_HEAP_SIZE: "400M"
MIN_HEAP_SIZE: "400M"
HEAP_NEWSIZE: "48M"
volumes:
- type: tmpfs
target: /var/lib/cassandra
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ services:
MAX_HEAP_SIZE: "400M"
MIN_HEAP_SIZE: "400M"
HEAP_NEWSIZE: "48M"
volumes:
- type: tmpfs
target: /var/lib/cassandra
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ services:
CASSANDRA_ENABLE_USER_DEFINED_FUNCTIONS: "true"
CASSANDRA_INIT_MAX_RETRIES: "500"
CASSANDRA_INIT_SLEEP_TIME: "1"
volumes:
&volumes
- type: tmpfs
target: /bitnami/cassandra

cassandra-two:
image: *image
Expand All @@ -44,3 +48,4 @@ services:
ipv4_address: 172.16.1.3
healthcheck: *healthcheck
environment: *environment
volumes: *volumes
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ services:
CASSANDRA_ENABLE_USER_DEFINED_FUNCTIONS: "true"
CASSANDRA_INIT_MAX_RETRIES: "500"
CASSANDRA_INIT_SLEEP_TIME: "1"
volumes:
&volumes
- type: tmpfs
target: /bitnami/cassandra

cassandra-two:
image: *image
Expand All @@ -44,3 +48,4 @@ services:
ipv4_address: 172.16.1.3
healthcheck: *healthcheck
environment: *environment
volumes: *volumes

0 comments on commit ab63447

Please sign in to comment.