From 3a6ea4ca62405efaed7344024bcd151c6e079985 Mon Sep 17 00:00:00 2001 From: Sascha Date: Fri, 5 Jun 2026 15:08:57 +0200 Subject: [PATCH] feat: Add deployment guide for IONOS VPS setup --- docs/DEPLOYMENT_IONOS_VPS.md | 162 +++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 docs/DEPLOYMENT_IONOS_VPS.md diff --git a/docs/DEPLOYMENT_IONOS_VPS.md b/docs/DEPLOYMENT_IONOS_VPS.md new file mode 100644 index 0000000..4d007c2 --- /dev/null +++ b/docs/DEPLOYMENT_IONOS_VPS.md @@ -0,0 +1,162 @@ +# GPLX – Deploy auf IONOS VPS + +Zielumgebung: IONOS VPS oder Cloud Server mit Root-SSH-Zugang, Debian/Ubuntu. + +--- + +## 1. Server-Voraussetzungen + +SSH auf den Server, dann: + +```bash +apt update && apt install -y apache2 php8.3 php8.3-mysql php8.3-xml \ + php8.3-mbstring php8.3-intl php8.3-curl php8.3-gd php8.3-zip \ + mariadb-server git +``` + +--- + +## 2. Code auf den Server bringen + +### Option A: über ein Git-Remote + +```bash +# lokal – einmalig ein Remote hinzufügen +git remote add ionos ssh://root@/var/www/gplx +git push ionos main +``` + +### Option B: direkt auf dem Server klonen + +```bash +cd /var/www +git clone gplx +``` + +--- + +## 3. MySQL-Datenbank einrichten + +```bash +mysql -u root -p +``` + +```sql +CREATE DATABASE gplx CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +CREATE USER 'gplx'@'localhost' IDENTIFIED BY 'STRONG_PASSWORD'; +GRANT ALL PRIVILEGES ON gplx.* TO 'gplx'@'localhost'; +FLUSH PRIVILEGES; +EXIT; +``` + +--- + +## 4. LocalSettings.php anpassen + +Drei Stellen müssen auf Produktionswerte geändert werden: + +```php +// Server-URL +$wgServer = "https://yourdomain.de"; + +// Datenbank +$wgDBserver = "localhost"; +$wgDBname = "gplx"; +$wgDBuser = "gplx"; +$wgDBpassword = "STRONG_PASSWORD"; + +// Semantic MediaWiki (im ExtensionFunctions-Hook) +enableSemantics( 'yourdomain.de' ); // Domain ohne Protokoll und Port +``` + +Neuen Secret Key generieren (der aktuelle ist im Git-Verlauf): + +```bash +openssl rand -hex 32 +``` + +Den generierten Wert als `$wgSecretKey` eintragen. + +--- + +## 5. Datenbank-Tabellen anlegen + +Da die Datenbank neu und leer ist, reicht `update.php`: + +```bash +cd /var/www/gplx/mediawiki +php maintenance/run.php update --quick +``` + +--- + +## 6. SMW-Tabellen einrichten + +```bash +php extensions/SemanticMediaWiki/maintenance/setupStore.php --nochecks +``` + +--- + +## 7. Apache-Vhost konfigurieren + +Datei `/etc/apache2/sites-available/gplx.conf` anlegen: + +```apache + + ServerName yourdomain.de + DocumentRoot /var/www/gplx/mediawiki + + + AllowOverride All + Require all granted + + +``` + +```bash +a2enmod rewrite +a2ensite gplx +a2dissite 000-default +systemctl reload apache2 +``` + +Für HTTPS (empfohlen) Certbot nachinstallieren: + +```bash +apt install -y certbot python3-certbot-apache +certbot --apache -d yourdomain.de +``` + +--- + +## 8. Dateisystem-Berechtigungen + +```bash +chown -R www-data:www-data /var/www/gplx/mediawiki/images +chmod -R 755 /var/www/gplx/mediawiki/images +``` + +--- + +## 9. Smoke-Test + +1. `https://yourdomain.de` im Browser öffnen – Startseite muss laden. +2. Als Admin einloggen und eine Testseite erstellen. +3. SMW-Abfrage prüfen: `Special:Ask` aufrufen. +4. Accessibility-Check lokal gegen die Live-URL laufen lassen: + ```bash + npm run a11y:all + ``` + (Pa11y-Ziel-URL in `tests/accessibility/pa11y.config.json` vorher anpassen.) + +--- + +## Wichtige Gotchas + +| Problem | Ursache | Lösung | +|---|---|---| +| SMW speichert keine Eigenschaften | `enableSemantics()` enthält noch `127.0.0.1:8080` | Domain in LocalSettings.php korrigieren, `rebuildData.php` ausführen | +| Seiten zeigen "Page Not Available" | ApprovedRevs aktiv, keine genehmigte Version | Als Admin einloggen und Revision genehmigen | +| 500-Fehler nach Deploy | `$wgShowExceptionDetails = true` für Debug, danach wieder entfernen | Fehlermeldung lesen, dann deaktivieren | +| Images-Ordner nicht beschreibbar | Falscher Owner nach `git clone` | `chown -R www-data:www-data images/` |