Last active
April 16, 2025 23:28
-
-
Save booleangate/ba24072715525d4214c6dcd1f0b765e2 to your computer and use it in GitHub Desktop.
Migrate your local database to mongo.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
git checkout main | |
git pull | |
mongodump --db=pblocal | |
brew services stop $(brew services list | grep mongodb-community | cut -f1 -d' ') | |
# Docker setup requires this file for some reason (see thread) | |
ls apps/eris/.env.local &> /dev/null || cp apps/eris/.env.sample apps/eris/.env.local | |
docker compose down mongo | |
docker compose up mongo --wait | |
mongorestore ./dump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment