-
First create a
.envfile locally. Please refer to the file.env.templatefor all the variables that need to be added. -
There are three secrets, please ask one of the code owners for these secrets to add them to your
.envfile -
(If you are on macOS) Copy the
init-mongo.jsinto~/
cp ./init-mongo.js ~/init-mongo.js
- Run docker compose down to remove all the images and stop all the containers running
If you do not want to remove the attached mongodb volume:
docker compose down --rmi allIf you want to remove the attached volume
docker compose down --rmi all -v- Run docker compose up with the --no-deps flags to rebuild the images
docker compose up -dFlask (503):
- The issue is quite possible with mongo
- Run the following code to hard-reset the system (NOTE: This should be done with extreme care and ONLY WHEN NECESSARY as it deletes volumes)
docker compose down --rmi all -v The PRIVATE_KEY in the .env file needs to be base64 encoded
$(cat <<location of the pem file>> | base64)
- Export the variable in the .env to the terminal
set -a
source .env
set +a
- Start the backup
mongodump --host=localhost:$MONGO -u=$MONGODB_INITDB_ROOT_USERNAME -p=$MONGODB_INITDB_ROOT_PASSWORD -d=$MONGODB_INITDB_DATABASE -o="<Backup location>"
- Export the variable in the .env to the terminal
set -a
source .env
set +a
- Start the backup restoration
mongorestore --host=localhost:$MONGO -u=$MONGODB_INITDB_ROOT_USERNAME -p=$MONGODB_INITDB_ROOT_PASSWORD