BAEL-3777: Fixed init of cassandra
This commit is contained in:
parent
8b49858bfe
commit
ef3570baaf
@ -1,9 +1,9 @@
|
||||
CREATE KEYSPACE IF NOT exists order_database
|
||||
WITH replication = {'class':'SimpleStrategy', 'replication_factor':1};
|
||||
|
||||
CREATE TYPE order_database.orderitementity (productid uuid, price decimal);
|
||||
CREATE TYPE IF NOT EXISTS order_database.orderitementity (productid uuid, price decimal);
|
||||
|
||||
CREATE TABLE order_database.orderentity(
|
||||
CREATE TABLE IF NOT EXISTS order_database.orderentity(
|
||||
id uuid,
|
||||
status text,
|
||||
orderitementities list<frozen<orderitementity>>,
|
@ -3,6 +3,7 @@ version: '3'
|
||||
services:
|
||||
order-mongo-database:
|
||||
image: mongo:3.4.13
|
||||
container_name: order-mongo-db
|
||||
restart: always
|
||||
ports:
|
||||
- 27017:27017
|
||||
@ -14,6 +15,16 @@ services:
|
||||
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
|
||||
order-cassandra-database:
|
||||
image: cassandra:3.11.5
|
||||
container_name: order-cassandra-db
|
||||
restart: always
|
||||
ports:
|
||||
- 9042:9042
|
||||
- 9042:9042
|
||||
order-cassandra-init:
|
||||
image: cassandra:3.11.5
|
||||
container_name: order-cassandra-db-init
|
||||
depends_on:
|
||||
- order-cassandra-database
|
||||
volumes:
|
||||
- ./cassandra-init.cql:/cassandra-init.cql:ro
|
||||
command: bin/bash -c "echo Initializing cassandra schema... && sleep 30 && cqlsh -u cassandra -p cassandra -f cassandra-init.cql order-cassandra-db"
|
||||
|
@ -1,4 +1,4 @@
|
||||
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoAutoConfiguration
|
||||
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
|
||||
spring.data.mongodb.host=127.0.0.1
|
||||
spring.data.mongodb.port=27017
|
||||
spring.data.mongodb.database=order-database
|
||||
|
Loading…
x
Reference in New Issue
Block a user