diff --git a/scripts/mongo_profile b/scripts/mongo_profile new file mode 100644 index 0000000..703f6a8 --- /dev/null +++ b/scripts/mongo_profile @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +export MONGO_CA_CERT="${HOME}/certs/mongo_dev/mongod.crt" +export MONGO_PEM_CERT="${HOME}/certs/mongo_dev/mongod.pem" + +restore_bookstore() { + mongorestore -u toor -p ${1} --authenticationDatabase 'admin' --ssl --host docker1 --sslCAFile ${MONGO_CA_CERT} --sslPEMKeyFile ${MONGO_PEM_CERT} --sslAllowInvalidCertificates --drop --db bookstore ./ data/bookstore +} + +restore_dealership (){ + mongorestore -u toor -p ${1} --authenticationDatabase 'admin' --ssl --host docker1 --sslCAFile ${MONGO_CA_CERT} --sslPEMKeyFile ${MONGO_PEM_CERT} --sslAllowInvalidCertificates --drop --db dealership ./data/de alership +} + +mongo_dev_connect (){ + mongo -u toor -p ${1} --authenticationDatabase 'admin' --ssl --host docker1 --sslCAFile ${MONGO_CA_CERT} --sslPEMKeyFile ${MONGO_PEM_CERT} --sslAllowInvalidCertificates +} \ No newline at end of file