staging, App-ID 61284ca9-0a65-495d-bda9-2edfe8bf26a1). Bezug: ADR-0019. Phasen 1–6 erledigt. Offen: Cronjobs (Phase 7), Document-Root-Mapping + Domain-Mapping (Phase 8). Betriebliche Besonderheit: SSH-Deploy-User landet auf SSH-Gateway (100.121.108.117), nicht PHP-App-Host. DB-User: dbu_dqgxag_1. Details: docs/context/0007-mittwald-staging-live.md.
8 Phasen als Tracer-Bullets — jede Phase produziert einen definierten lauffähigen Endzustand. Phase 1+2+3 = erster Lebenszeichen-Deploy. Phase 5+6 = Auto-CI.
MySQL-DB (mysql_dqgxag) + Redis anlegen, mit staging-App verknüpfen, Capistrano-Layout-Verzeichnisse (releases/, shared/files/, shared/private/) via mw app exec anlegen. App-Root ermitteln → in Azure-Variable-Group eintragen.
drupal/redis installieren + config:export. web/sites/example.settings.mittwald.php als Template (DB, Redis, trusted_host_patterns, reverse_proxy). settings.php conditional include. .gitignore ergänzen.
Build-Artefakt lokal: composer install --no-dev + npm build. Upload via mw app upload in releases/$RELEASE. Shared-Symlinks setzen (files/, private/, settings.mittwald.php). Atomarer Symlink-Switch current → releases/$RELEASE. Kein drush site:install — DB folgt in Phase 4.
ddev export-db → optional MariaDB/MySQL Collation-Sanity-Sed → Restore via mw db push oder SSH+mysql. Config-Re-Import + cache:rebuild. shared/files/ via rsync rüberziehen.
Variable Group solcom-mittwald-secrets-test mit MITTWALD_API_TOKEN, MITTWALD_PROJECT_ID, MITTWALD_APP_ID_TEST, MITTWALD_APP_ROOT_TEST, MITTWALD_TEST_URL. azure-pipelines.yml mit 4 Stages (PR-Validation, Build, DeployTest, DeployProd). scripts/smoke-test.sh.
Trockenlauf-PR → PR-Validation läuft grün → Merge → Build + DeployTest automatisch → Test-Site hat neuen Stand in ~5–10 Min. Rollback-Trockenlauf: atomarer Symlink-Switch auf vorletzten Release via Manual Job.
drupal-cron-15min (*/15 * * * * drush cron) und solcom-vacancy-migrate-hourly (0 * * * * drush migrate:import solcom_vacancy --update) via mStudio anlegen. Manuelle Trigger-Verifikation. Watchdog-Logs prüfen.
Document Root auf /current/web setzen. Domain p-nxm58l.project.space auf App mappen. End-to-End-Smoke-Suite (Homepage, /admin, Vacancy-Detail, Image-Styles). Performance-Spot-Check. Runbook docs/runbooks/deploy-test.md. Folge-ADR für Prod-Bootstrap queuen.
4 Stages in azure-pipelines.yml. Alle Stages teilen sich den Build-Artifact via Azure Pipelines Artifact-Store. DeployProd erfordert Manual-Approval-Gate.
solcom-mittwald-secrets-test: MITTWALD_API_TOKEN (secret), APP_ID, APP_ROOT, TEST_URLKritischste Stellen: Smoke-Test-Skript und settings.mittwald.php Conditional-Include-Pattern.
#!/usr/bin/env bash set -euo pipefail APP_ID="${1:?app-id required}" APP_ROOT="${2:?app-root required}" URL="${3:?public URL required}" mw app exec \ --installation-id="$APP_ID" \ "$APP_ROOT/current/vendor/bin/drush \ --root=$APP_ROOT/current/web \ status --field=bootstrap" \ | grep -q "Successful" curl -sf -o /dev/null \ -w "%{http_code}\n" "$URL" \ | grep -qE "^(200|301|302)$"
// Anhängen ans Ende von settings.php: if (file_exists( $app_root . '/' . $site_path . '/settings.mittwald.php' )) { include $app_root . '/' . $site_path . '/settings.mittwald.php'; } // settings.mittwald.php liegt auf Mittwald // unter /shared/ und wird pro Release // nach web/sites/default/ symlinkt. // .gitignore: settings.mittwald.php
sed -i.bak 's/utf8mb4_uca1400_ai_ci/utf8mb4_0900_ai_ci/g'. Wenn Restore systematisch hängt: DDEV-Engine in Folge-ADR umstellen./current/web gesetzt werden (macht App temporär 404 bis Symlink existiert). Domain p-nxm58l.project.space auf App mappen. Beide Schritte aus Phase 1 wurden bewusst auf Phase 8 verschoben, weil zunächst kein externer Traffic erwartet wird.test.solcom.de ebenfalls Prod-Plan-Items.