Skip to content

Instantly share code, notes, and snippets.

@chiarabeth
Last active August 25, 2021 20:11
Show Gist options
  • Save chiarabeth/652117109e6d47b7ec63ab29e4aece61 to your computer and use it in GitHub Desktop.
Save chiarabeth/652117109e6d47b7ec63ab29e4aece61 to your computer and use it in GitHub Desktop.
Docker Mongo 7c
#!/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
mongo --host my_mongo --username root --password rootpassword --authenticationDatabase admin setupUsers.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment