add datas

This commit is contained in:
mr
2025-03-27 13:32:27 +01:00
parent 626a1b1f22
commit 82aed0fdb6
7 changed files with 15 additions and 0 deletions

9
docker/db/add.sh Executable file
View 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