Files
Plenario/docs/configuration.md
gnilebeinandClaude Sonnet 5.5 7fa33bbbdd
CI / Deploy / PHP 8.4 (push) Successful in 1m11s
CI / Deploy / PHP 8.5 (push) Successful in 1m12s
CI / Deploy / test (push) Successful in 1s
CI / Deploy / deploy (push) Skipped
Drop app_local.php from production and show the mail transport in polls remind
app_local.php takes precedence over config/.env, so a copy made from an older
template forced the file transport and reminders never left the server.
Release package and Docker image now ship without it; app.php reads the
database from DATABASE_URL (SQLite default). app_local.example.php keeps
development defaults only. polls remind prints the transport and warns when
SMTP_HOST is set but SMTP is not used.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-16 14:52:58 +01:00

44 lines
3.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Konfiguration
Alle Einstellungen über Umgebungsvariablen oder `config/.env`. Anleitung zum Betrieb: [deployment.md](deployment.md).
Alle Einstellungen gehen über Umgebungsvariablen oder `config/.env`
(Vorlage mit allen Variablen: [config/.env.example](../config/.env.example)). Echte Umgebungsvariablen
haben Vorrang vor der Datei.
**Pflicht in Produktion:** `DEBUG=false`, `APP_FULL_BASE_URL`, `SECURITY_SALT` und ein Mail-Transport (`SMTP_HOST`).
Alles andere ist optional und hat einen Standardwert. In der Spalte „Standard“ bedeutet „–“: kein Standard, der Wert muss gesetzt werden.
| Variable | Pflicht? | Standard | Bedeutung |
|---|---|---|---|
| `DEBUG` | Produktion: ja | `false` (lokal: die von Composer erzeugte `app_local.php` setzt `true`) | In Produktion `false` lassen, sonst werden Admin-Links direkt angezeigt |
| `APP_FULL_BASE_URL` | Produktion: ja | – (lokal `http://localhost:8765`) | Öffentliche URL inkl. `https://`, wird für Links in E-Mails gebraucht. In Produktion wird außerdem der Host-Header dagegen geprüft |
| `SECURITY_SALT` | ja | – (lokal wird er von Composer erzeugt) | Langer Zufallswert. **Nicht nachträglich ändern** – damit werden Admin-Tokens verschlüsselt und Teilnehmer-IDs gehasht |
| `DATABASE_URL` | optional | leer = SQLite in `data/` | Sonst z. B. `mysql://user:pw@host/plenario?encoding=utf8mb4` oder `postgres://user:pw@host/plenario` |
| `SMTP_HOST` | Produktion: ja | leer = Mails nur als Datei in `tmp/mails/` (per `app_local.php`), sonst PHP `mail()` | Mailserver. Ohne ihn kommt der Admin-Link nie bei den Nutzenden an. **Achtung:** Eine `config/app_local.php` hat Vorrang vor `.env`; ein `FileTransport` darin (ältere Vorlage) überschreibt SMTP, die Mails landen dann nur in `tmp/mails/`. Auf Servern gehört keine `app_local.php` hin, sie ist nur für die lokale Entwicklung. `bin/cake polls remind` zeigt den verwendeten Transport an und warnt davor |
| `SMTP_PORT` | optional | `587` | Port 465 nutzt automatisch SSL |
| `SMTP_USER`, `SMTP_PASSWORD` | optional | leer | Zugangsdaten, falls der Mailserver sie verlangt |
| `SMTP_TLS` | optional | `true` | `true` = STARTTLS, `false` = unverschlüsselt |
| `MAIL_FROM` | empfohlen | `noreply@localhost` | Absenderadresse, sollte zum Mailserver passen |
| `MAIL_FROM_NAME` | optional | `PlenarIO` | Absendername |
| `CAPTCHA_TYPE` | optional | `math` | `none`, `math` (Rechenaufgabe) oder `recaptcha` |
| `RECAPTCHA_SITE_KEY`, `RECAPTCHA_SECRET_KEY` | nur bei `recaptcha` | leer | Für reCAPTCHA v2 („Ich bin kein Roboter“) |
| `SHOW_ADMIN_LINK_AFTER_CREATE` | optional | Wert von `DEBUG` | Nur für Entwicklung, in Produktion nie aktivieren |
| `THROTTLE_CREATE_PER_HOUR` | optional | `10` | Umfragen pro IP und Stunde (0 = aus) |
| `THROTTLE_RECOVER_PER_HOUR` | optional | `5` | Wiederherstellungs-Mails pro IP und Stunde (0 = aus) |
| `THROTTLE_VOTES_PER_MINUTE` | optional | `600` | Antworten pro IP und Minute (0 = aus). Hoch lassen: Oft teilt sich ein ganzer Saal eine IP |
| `POLL_RETENTION_DAYS` | optional | `90` | Umfragen werden so viele Tage nach dem Anlegen vom Cronjob gelöscht (0 = nie) |
| `POLL_REMINDER_DAYS` | optional | `14` | So viele Tage vorher bekommt der Besitzer eine Erinnerungsmail (0 = keine, muss kleiner als die Laufzeit sein) |
| `POLL_INTERVAL_MS` | optional | `2000` | Aktualisierungsintervall der Live-Ansichten in Millisekunden |
| `EMBED_HEARTBEAT_SECONDS` | optional | `5` | Eingebettete Folien: Intervall des Lebenszeichens |
| `EMBED_TIMEOUT_SECONDS` | optional | `20` | Eingebettete Folien: Zeit ohne Lebenszeichen bis zur automatischen Pause |
| `EMBED_FRAME_ANCESTORS` | optional | `*` (alle) | Welche Seiten Folien einbetten dürfen (CSP `frame-ancestors`), z. B. `https://*.canva.com` |
Einen `SECURITY_SALT` erzeugen:
```bash
php -r "echo bin2hex(random_bytes(32));"
# oder ohne PHP:
openssl rand -hex 32
```