added quartz external wiki

This commit is contained in:
2025-11-29 10:30:33 +01:00
parent b10f224a7b
commit 9be0af25f7
14 changed files with 824 additions and 62 deletions

127
QUARTZ-SETUP-SERVER.md Executable file
View File

@@ -0,0 +1,127 @@
# Quartz Setup auf dem Server
## Übersicht
Diese Anleitung beschreibt, wie Sie Quartz als separate Instanz auf Port 3033 auf Ihrem Server einrichten.
## Optionen für Quartz-Instanz
### Option 1: Quartz direkt auf dem Host (Empfohlen)
Quartz läuft direkt auf dem Server-Host auf Port 3033:
```bash
# Quartz starten
cd /path/to/quartz
npx quartz build
npx serve -s public -l 3033
```
**Konfiguration:** `NEXT_PUBLIC_WIKI_URL=http://localhost:3033`
### Option 2: Quartz in separatem Docker-Container
Quartz läuft in einem eigenen Container:
```yaml
# docker-compose.wiki.yml
services:
quartz:
image: your-quartz-image
ports:
- "3033:3033"
volumes:
- ./wiki-vault:/app/content
- ./wiki-public:/app/public
```
**Konfiguration:**
- Für Browser (iframe): `NEXT_PUBLIC_WIKI_URL=http://localhost:3033`
- Falls Next.js-Container zugreift: `NEXT_PUBLIC_WIKI_URL=http://host.docker.internal:3033`
### Option 3: Quartz im Docker-Netzwerk
Beide Container im gleichen Netzwerk:
```bash
# Netzwerk erstellen
docker network create wiki-network
# Next.js Container
docker-compose up -d
docker network connect wiki-network doing-it-web-1
# Quartz Container
docker run -d --name quartz --network wiki-network -p 3033:3033 your-quartz-image
```
**Konfiguration:** `NEXT_PUBLIC_WIKI_URL=http://quartz:3033`
## Wichtiger Hinweis
Da das iframe **client-side** im Browser läuft (nicht im Container), verwendet es die URL so wie sie gesetzt ist:
- **`localhost:3033`** funktioniert, wenn Quartz auf dem Host läuft
- **`host.docker.internal:3033`** funktioniert nur von einem Container aus, NICHT vom Browser
- Für Browser muss die **öffentliche URL** verwendet werden (z.B. `http://doing-it.de:3033` oder über Reverse Proxy)
## Reverse Proxy Setup (Empfohlen für Produktion)
### Mit Nginx
```nginx
server {
listen 80;
server_name wiki.doing-it.de;
location / {
proxy_pass http://localhost:3033;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
```
**Dann:** `NEXT_PUBLIC_WIKI_URL=http://wiki.doing-it.de`
### Oder Subpath
```nginx
server {
listen 80;
server_name doing-it.de;
location /wiki-content/ {
proxy_pass http://localhost:3033/;
}
}
```
## Environment-Variable setzen
### In docker-compose.yml (bereits konfiguriert)
```yaml
environment:
- NEXT_PUBLIC_WIKI_URL=${NEXT_PUBLIC_WIKI_URL:-http://localhost:3033}
```
### In .env Datei
```bash
NEXT_PUBLIC_WIKI_URL=http://localhost:3033
```
### Bei Container-Start
```bash
NEXT_PUBLIC_WIKI_URL=http://localhost:3033 docker-compose up -d
```
## Testing
1. Quartz starten auf Port 3033
2. Prüfen: `curl http://localhost:3033`
3. Next.js starten
4. Wiki-Seite öffnen: `http://localhost:3001/wiki`
5. Browser-Entwicklertools (F12) öffnen und prüfen, ob iframe geladen wird