feat(db): add postgres setup and multi-tenant config

This commit is contained in:
DanielS
2026-08-18 23:56:51 +02:00
commit 407d40b2e8
13 changed files with 420 additions and 0 deletions

18
start-db.sh Normal file
View 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!"