Skip to content

Commit

Permalink
Let the make_superuser script target other databases #2712
Browse files Browse the repository at this point in the history
  • Loading branch information
iamleeg committed Jun 14, 2022
1 parent fcc8d83 commit f2c9d14
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dev/make_superuser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ set -e
pushd `pwd`
# We have to run docker-compose from this directory for it to pick up the .env file.
cd `dirname "$0"`
docker-compose -f docker-compose.yml -f docker-compose.dev.yml exec mongo mongo covid19 --eval "var email='$1'; var roles=['admin', 'curator'];" /verification/scripts/roles.js

# Tell us what database to use — default is covid19 but you can override it for other instances
DB="${GDH_DATABASE:-covid19}"
docker-compose -f docker-compose.yml -f docker-compose.dev.yml exec mongo mongo "${DB}" --eval "var email='$1'; var roles=['admin', 'curator'];" /verification/scripts/roles.js
# Restore directory.
popd

0 comments on commit f2c9d14

Please sign in to comment.