Fix start_db.sh again
This commit is contained in:
parent
6576da2660
commit
fb1ae0f3bc
1 changed files with 2 additions and 0 deletions
|
@ -12,6 +12,8 @@ if [[ $# == 1 ]] && [[ $1 == "stop" ]]; then
|
||||||
echo "Stopped the postgres container"
|
echo "Stopped the postgres container"
|
||||||
elif [[ $# == 1 ]] && [[ $1 == "db" ]]; then
|
elif [[ $# == 1 ]] && [[ $1 == "db" ]]; then
|
||||||
echo "Setting up database"
|
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
|
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
|
until psql "postgres://mindshub:test@localhost:5432" <<< "CREATE DATABASE insignorocketdb;"; do
|
||||||
sleep 0.5;
|
sleep 0.5;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue