Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

docker-compose cassandra db

version: '3.5'

services:
  cassandra:
      image: cassandra:latest
      container_name: cassandra
      ports:
        - "9042:9042"
      environment:
        - "MAX_HEAP_SIZE=256M"
        - "HEAP_NEWSIZE=128M"
      restart: always
      volumes:
        - ./out/cassandra_data:/var/lib/cassandra

  cassandra-load-keyspace:
      container_name: cassandra-load-keyspace
      image: cassandra:latest
      depends_on:
        - cassandra
      volumes:
        - ./src/main/resources/cassandra_schema.cql:/schema.cql 
      command: /bin/bash -c "sleep 60 && echo loading cassandra keyspace && cqlsh cassandra -f /schema.cql"
Comment

docker-compose cassandra db

version: '2.2'

services:
  cassandra:
      image: cassandra:3.11.2
      container_name: cassandra
      ports:
        - "9042:9042"
      environment:
        - "MAX_HEAP_SIZE=256M"
        - "HEAP_NEWSIZE=128M"
      restart: always
      volumes:
        - ./out/cassandra_data:/var/lib/cassandra
      healthcheck:
        test: ["CMD", "cqlsh", "-u cassandra", "-p cassandra" ,"-e describe keyspaces"]
        interval: 15s
        timeout: 10s
        retries: 10

  cassandra-load-keyspace:
      container_name: cassandra-load-keyspace
      image: cassandra:3.11.2
      depends_on:
        cassandra:
          condition: service_healthy
      volumes:
        - ./src/main/resources/cassandra_schema.cql:/schema.cql
      command: /bin/bash -c "echo loading cassandra keyspace && cqlsh cassandra -f /schema.cql"
Comment

PREVIOUS NEXT
Code Example
Csharp :: change object position 
Csharp :: insert data to access database c# 
Csharp :: how to set a color of text in unity 2020 script 
Csharp :: c# define array 
Csharp :: c# getting response content from post 
Csharp :: convert bitmap to imagesource 
Csharp :: c# sc create service 
Csharp :: quaternion to euler 
Csharp :: matrix transpose 
Csharp :: exception is null c# 
Csharp :: c# copy an object 
Csharp :: combined 2 arrays 
Csharp :: send mail c# 
Csharp :: C# date type no time 
Csharp :: Convert a string to Integer in C# without library function 
Csharp :: if exercises c# 
Csharp :: c sharp xml prettier 
Csharp :: c# insert today datetime 
Csharp :: technische vragen c# 
Csharp :: infinit range loop c# 
Csharp :: unity set dictionary value 
Csharp :: c# how to disable a event 
Csharp :: how do you search for how many times a character appears in user input on c sharp 
Csharp :: blazor wasm roles not working 
Csharp :: datareader get field names 
Csharp :: Unity android plugin callback 
Csharp :: edit opened excel file directly 
Csharp :: c# linq query map to entity 
Csharp :: ExpandoObject Convert to Json or Json to ExpandoObject 
Csharp :: backcolor app winform C3 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =