feat(db): add postgres setup and multi-tenant config
This commit is contained in:
18
start-db.sh
Normal file
18
start-db.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
if [ ! -f .env ]; then
|
||||
echo "Keine .env vorhanden. Kopiere .env.example..."
|
||||
cp .env.example .env
|
||||
fi
|
||||
|
||||
echo "Starte PostgreSQL Container..."
|
||||
docker compose up -d
|
||||
|
||||
echo "Warte auf Datenbank Healthcheck..."
|
||||
until [ "`docker inspect --format='{{json .State.Health.Status}}' caspos-postgres`" == "\"healthy\"" ]; do
|
||||
echo "PostgreSQL startet noch..."
|
||||
sleep 2
|
||||
done
|
||||
|
||||
echo "PostgreSQL ist einsatzbereit!"
|
||||
Reference in New Issue
Block a user