1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

Update dev setup guide (#1222)

* Update dev setup guide with current best practice

* Minor amendments to setup instructions

* Move vault_dev migrator script to its own file

* Fix typo, use command line args for SA_PASSWORD

* Move setup guide to its own file

* fix typo
This commit is contained in:
Thomas Rittson
2021-03-22 07:56:31 +10:00
committed by GitHub
parent 694347e8d3
commit fd42b227b3
4 changed files with 255 additions and 214 deletions

View File

@ -0,0 +1,21 @@
# Creates and populates vault_dev - used for development purposes
# This should be run from within an empty MSSQL Docker container
# See instructions in SETUP.md
if [ -z $1 ]; then
echo "Error: you must provide SA_PASSWORD as the first argument."
echo "You should wrap your password in single quotes to make sure it is correctly interpreted."
exit 1
fi
MIGRATE_DIRECTORY="/mnt/migrator/DbScripts/"
SERVER="localhost"
DATABASE="vault_dev"
USER="sa"
PASSWD="$1"
/opt/mssql-tools/bin/sqlcmd -S $SERVER -d master -U $USER -P $PASSWD -I -Q "CREATE DATABASE $DATABASE;"
for f in `ls -v $MIGRATE_DIRECTORY/*.sql`; do
/opt/mssql-tools/bin/sqlcmd -S $SERVER -d $DATABASE -U $USER -P $PASSWD -I -i $f
done;