add datas
This commit is contained in:
9
docker/db/add.sh
Executable file
9
docker/db/add.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker cp ./datas mongo:.
|
||||
|
||||
for i in $(ls ./datas); do
|
||||
firstString=$i
|
||||
echo "ADD file $i in collection ${i/.json/}"
|
||||
docker exec -it mongo sh -c "mongoimport --jsonArray --db DC_myDC --collection ${i/.json/} --file ./datas/$i"
|
||||
done
|
||||
Reference in New Issue
Block a user