Fix start_db.sh again

This commit is contained in:
Fabio Giovanazzi 2025-08-02 13:20:51 +02:00
parent 6576da2660
commit fb1ae0f3bc
No known key found for this signature in database
GPG key ID: 4BDF1B40A49FDD23

View file

@ -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;