New Deploy for Demo
This commit is contained in:
10
docker/demo/db-2/add.sh
Executable file
10
docker/demo/db-2/add.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
# Load data into node 2's MongoDB (container: mongo2, port 27018)
|
||||
MONGO_CONTAINER=${1:-mongo2}
|
||||
|
||||
docker cp ./datas $MONGO_CONTAINER:.
|
||||
|
||||
for i in $(ls ./datas); do
|
||||
echo "ADD file $i in collection ${i/.json/}"
|
||||
docker exec -it $MONGO_CONTAINER sh -c "mongoimport --jsonArray --db DC_myDC --collection ${i/.json/} --file ./datas/$i"
|
||||
done
|
||||
Reference in New Issue
Block a user