diff --git a/scripts/init_db b/scripts/init_db index 7508cf47..5ca83b86 100755 --- a/scripts/init_db +++ b/scripts/init_db @@ -11,23 +11,5 @@ docker-compose run \ -e PGUSER=postgres \ -e PGPASSWORD=${PGPASSWORD} \ web \ - psql -c "CREATE ROLE ${SITE_ID} PASSWORD '${SITE_PASSWORD}' SUPERUSER LOGIN CREATEDB;" \ + psql -c "CREATE ROLE bulbs PASSWORD 'testing' SUPERUSER LOGIN CREATEDB;" \ || true - -docker-compose run \ - -e PGHOST=postgres \ - -e PGUSER=${SITE_ID} \ - -e PGPASSWORD=${SITE_PASSWORD} \ - web \ - psql -d postgres -c "DROP DATABASE IF EXISTS ${SITE_DB};" - -docker-compose run \ - -e PGHOST=postgres \ - -e PGUSER=${SITE_ID} \ - -e PGPASSWORD=${SITE_PASSWORD} \ - web \ - psql -d postgres -c "CREATE DATABASE ${SITE_DB};" - -docker-compose run \ - web \ - python manage.py migrate --noinput \ No newline at end of file diff --git a/scripts/test b/scripts/test index 277ac0f7..d52445df 100755 --- a/scripts/test +++ b/scripts/test @@ -3,4 +3,4 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -docker-compose run web py.test tests/ +docker-compose run web py.test "$@"