9 lines
223 B
Bash
9 lines
223 B
Bash
|
|
#!/bin/bash
|
||
|
|
set -e
|
||
|
|
|
||
|
|
for file in /initdb.d/commandes/*.json; do
|
||
|
|
collection=$(basename "$file" .json)
|
||
|
|
echo "Importing $collection..."
|
||
|
|
mongoimport --db commerce --collection "$collection" --file "$file" --jsonArray
|
||
|
|
done
|