diff --git a/start_db.sh b/start_db.sh index 3535b0f1..a509b94c 100755 --- a/start_db.sh +++ b/start_db.sh @@ -12,6 +12,8 @@ if [[ $# == 1 ]] && [[ $1 == "stop" ]]; then echo "Stopped the postgres container" elif [[ $# == 1 ]] && [[ $1 == "db" ]]; then echo "Setting up database" + sudo docker stop postgres + sudo docker container rm -f postgres sudo docker run -d --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=test -e POSTGRES_USER=mindshub postgres until psql "postgres://mindshub:test@localhost:5432" <<< "CREATE DATABASE insignorocketdb;"; do sleep 0.5;