fix: podman-compose down before up -d for clean state

This commit is contained in:
Claus Lohmar 2026-07-10 16:36:49 +01:00
parent 414ead35d0
commit b555f153be

View file

@ -99,9 +99,10 @@ if [ "$GREENFIELD" = true ]; then
# Podman network + deploy all 3 containers # Podman network + deploy all 3 containers
echo "[5/5] Deploying containers on $NETWORK_NAME..." echo "[5/5] Deploying containers on $NETWORK_NAME..."
podman network create "$NETWORK_NAME" 2>/dev/null || true podman network create "$NETWORK_NAME" 2>/dev/null || true
podman-compose -f "$TARGET_DIR/compose/launcher.yaml" up -d 2>&1 || echo "[WARN] Launcher deploy had issues" for COMPOSE in launcher authelia caddy; do
podman-compose -f "$TARGET_DIR/compose/authelia.yaml" up -d 2>&1 || echo "[WARN] Authelia deploy had issues" podman-compose -f "$TARGET_DIR/compose/$COMPOSE.yaml" down 2>/dev/null || true
podman-compose -f "$TARGET_DIR/compose/caddy.yaml" up -d 2>&1 || echo "[WARN] Caddy deploy had issues" podman-compose -f "$TARGET_DIR/compose/$COMPOSE.yaml" up -d 2>&1 || echo "[WARN] $COMPOSE deploy had issues"
done
sleep 3 sleep 3
AUTHELIA_SECRET=$(grep -oP 'session_secret: \K.*' "$TARGET_DIR/config/authelia/configuration.yml" 2>/dev/null || echo "") AUTHELIA_SECRET=$(grep -oP 'session_secret: \K.*' "$TARGET_DIR/config/authelia/configuration.yml" 2>/dev/null || echo "")