Skip to content

Instantly share code, notes, and snippets.

@chiarabeth
Created August 24, 2021 22:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chiarabeth/b41c3b107a41cffda1ff402b18f5ab42 to your computer and use it in GitHub Desktop.
Save chiarabeth/b41c3b107a41cffda1ff402b18f5ab42 to your computer and use it in GitHub Desktop.
Docker Mongo Step 4
#!/bin/bash
sleep 10
mongoimport --drop --host my_mongo --username root --password rootpassword --authenticationDatabase admin --db tutorial_db --collection Restaurants --type json --jsonArray --file /collections/Restaurants.json
mongoimport --drop --host my_mongo --username root --password rootpassword --authenticationDatabase admin --db tutorial_db --collection Users --type json --jsonArray --file /collections/Users.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment