|
@@ -1,5 +1,15 @@
|
|
|
<!-- --------------------------------------------------------------------------- -->
|
|
<!-- --------------------------------------------------------------------------- -->
|
|
|
|
|
|
|
|
|
|
+<!-- Ordner: Docs -->
|
|
|
|
|
+
|
|
|
|
|
+<!-- Datei: runbook.md -->
|
|
|
|
|
+
|
|
|
|
|
+<!-- Relativer Pfad: Docs/runbook.md -->
|
|
|
|
|
+
|
|
|
|
|
+<!-- --------------------------------------------------------------------------- -->
|
|
|
|
|
+
|
|
|
|
|
+<!-- --------------------------------------------------------------------------- -->
|
|
|
|
|
+
|
|
|
<!-- --------------------------------------------------------------------------- -->
|
|
<!-- --------------------------------------------------------------------------- -->
|
|
|
|
|
|
|
|
<!-- Ordner: Docs -->
|
|
<!-- Ordner: Docs -->
|
|
@@ -86,6 +96,48 @@ Then edit `.env.docker`:
|
|
|
SESSION_COOKIE_SECURE=false
|
|
SESSION_COOKIE_SECURE=false
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
|
+#### 2.2.1 Optional: Search provider configuration (RHL-016)
|
|
|
|
|
+
|
|
|
|
|
+The Search backend supports two providers:
|
|
|
|
|
+
|
|
|
|
|
+- `SEARCH_PROVIDER=fs` (default)
|
|
|
|
|
+
|
|
|
|
|
+ - Local/test fallback.
|
|
|
|
|
+ - Traverses the NAS-like folder structure directly.
|
|
|
|
|
+ - Not intended to be fast on real NAS scale.
|
|
|
|
|
+
|
|
|
|
|
+- `SEARCH_PROVIDER=qsirch`
|
|
|
|
|
+
|
|
|
|
|
+ - Production/intended provider.
|
|
|
|
|
+ - Uses QNAP Qsirch for indexed search.
|
|
|
|
|
+
|
|
|
|
|
+If you set `SEARCH_PROVIDER=qsirch`, these env variables are required:
|
|
|
|
|
+
|
|
|
|
|
+```env
|
|
|
|
|
+SEARCH_PROVIDER=qsirch
|
|
|
|
|
+QSIRCH_BASE_URL=http://<nas-ip>:8080
|
|
|
|
|
+QSIRCH_ACCOUNT=<qsirch-user>
|
|
|
|
|
+QSIRCH_PASSWORD=***
|
|
|
|
|
+QSIRCH_PATH_PREFIX=/Niederlassungen
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+Optional Qsirch tuning:
|
|
|
|
|
+
|
|
|
|
|
+```env
|
|
|
|
|
+# Allowed: modified | created (case-insensitive)
|
|
|
|
|
+QSIRCH_DATE_FIELD=modified
|
|
|
|
|
+
|
|
|
|
|
+# Allowed: sync | async | auto (case-insensitive)
|
|
|
|
|
+# Current implementation is sync-first.
|
|
|
|
|
+# - "auto" currently behaves like "sync" (future-proof placeholder).
|
|
|
|
|
+QSIRCH_MODE=sync
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+Notes:
|
|
|
|
|
+
|
|
|
|
|
+- `scripts/validate-env.mjs` enforces these keys when `SEARCH_PROVIDER=qsirch`.
|
|
|
|
|
+- Runtime normalizes Qsirch values (`trim`, `lowercase` for `QSIRCH_DATE_FIELD` / `QSIRCH_MODE`, and `trim` for `QSIRCH_PATH_PREFIX`) so behavior matches env validation.
|
|
|
|
|
+
|
|
|
### 2.3 Create local NAS fixtures
|
|
### 2.3 Create local NAS fixtures
|
|
|
|
|
|
|
|
Create a minimal NAS tree:
|
|
Create a minimal NAS tree:
|
|
@@ -109,6 +161,9 @@ If you prefer running in the background:
|
|
|
docker compose -f docker-compose.yml -f docker-compose.local.yml up -d --build
|
|
docker compose -f docker-compose.yml -f docker-compose.local.yml up -d --build
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
|
+> Note: The `app` container runs `node scripts/validate-env.mjs` automatically before `npm run start` (see `docker-compose.yml` `command:`).
|
|
|
|
|
+> If required env vars are missing/invalid, the container fails fast and logs the validation error.
|
|
|
|
|
+
|
|
|
### 2.5 Verify health
|
|
### 2.5 Verify health
|
|
|
|
|
|
|
|
```bash
|
|
```bash
|
|
@@ -273,6 +328,27 @@ This is required because most clients will not send `Secure` cookies over HTTP.
|
|
|
> If the application is served over **plain HTTP** (no TLS), many clients will not send `Secure` cookies back.
|
|
> If the application is served over **plain HTTP** (no TLS), many clients will not send `Secure` cookies back.
|
|
|
> In that case, logins will appear to “work” (Set-Cookie is present), but subsequent requests will still be unauthenticated.
|
|
> In that case, logins will appear to “work” (Set-Cookie is present), but subsequent requests will still be unauthenticated.
|
|
|
|
|
|
|
|
|
|
+#### 3.3.1 Optional: Search provider configuration (RHL-016)
|
|
|
|
|
+
|
|
|
|
|
+If the server should use Qsirch for search:
|
|
|
|
|
+
|
|
|
|
|
+```env
|
|
|
|
|
+SEARCH_PROVIDER=qsirch
|
|
|
|
|
+QSIRCH_BASE_URL=http://<nas-ip>:8080
|
|
|
|
|
+QSIRCH_ACCOUNT=<qsirch-user>
|
|
|
|
|
+QSIRCH_PASSWORD=***
|
|
|
|
|
+QSIRCH_PATH_PREFIX=/Niederlassungen
|
|
|
|
|
+
|
|
|
|
|
+# Optional:
|
|
|
|
|
+QSIRCH_DATE_FIELD=modified
|
|
|
|
|
+QSIRCH_MODE=sync
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+Operational notes:
|
|
|
|
|
+
|
|
|
|
|
+- `QSIRCH_BASE_URL` must be reachable **from inside the app container**.
|
|
|
|
|
+- Values are treated case-insensitively by validation; runtime normalizes the same way.
|
|
|
|
|
+
|
|
|
### 3.4 Start the stack on the server
|
|
### 3.4 Start the stack on the server
|
|
|
|
|
|
|
|
Use the base compose file only (no local override):
|
|
Use the base compose file only (no local override):
|