infra: clean up Keycloak configuration, enforce consistency in .env, and improve health checks
Streamlined Keycloak configurations with defaults for development and production in `.env`. Added health checks and improved environment variable documentation with comments to differentiate local and server deployments. Ensured compatibility with pre-built registry images.
This commit is contained in:
@@ -4,15 +4,25 @@
|
||||
# Sichert Datenbanken und Konfigurationen
|
||||
# ==========================================
|
||||
|
||||
# Konfiguration
|
||||
BACKUP_DIR="/home/grandmo/backups/meldestelle"
|
||||
# .env laden (SSoT für alle Variablen)
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
if [ -f "$PROJECT_ROOT/.env" ]; then
|
||||
set -a
|
||||
# shellcheck disable=SC1091
|
||||
source "$PROJECT_ROOT/.env"
|
||||
set +a
|
||||
fi
|
||||
|
||||
# Konfiguration (Defaults falls .env nicht vorhanden)
|
||||
BACKUP_DIR="${BACKUP_DIR:-$HOME/backups/meldestelle}"
|
||||
DATE=$(date +%Y-%m-%d_%H-%M-%S)
|
||||
RETENTION_DAYS=7
|
||||
PROJECT_NAME="meldestelle"
|
||||
RETENTION_DAYS="${BACKUP_RETENTION_DAYS:-7}"
|
||||
PROJECT_NAME="${PROJECT_NAME:-meldestelle}"
|
||||
|
||||
# Container Namen (müssen mit docker-compose übereinstimmen)
|
||||
DB_CONTAINER="${PROJECT_NAME}-postgres"
|
||||
DB_USER="meldestelle" # Oder aus .env lesen
|
||||
DB_USER="${POSTGRES_USER:-pg-user}"
|
||||
|
||||
# Verzeichnisse erstellen
|
||||
mkdir -p "$BACKUP_DIR"
|
||||
|
||||
Reference in New Issue
Block a user