95 lines
2.2 KiB
Markdown
95 lines
2.2 KiB
Markdown
# Deployment
|
|
|
|
## Voraussetzungen
|
|
|
|
- Podman + podman-compose
|
|
- Externes Podman-Netzwerk `traefik` (Traefik-Instanz läuft im selben Netzwerk)
|
|
- Traefik konfiguriert für Entrypoint `websecure` (HTTPS)
|
|
|
|
## Erstkonfiguration
|
|
|
|
```bash
|
|
cp .env.example .env # Umgebungsvariablen anpassen
|
|
```
|
|
|
|
## Build & Start
|
|
|
|
```bash
|
|
sudo podman compose up -d --build
|
|
```
|
|
|
|
Die App ist danach erreichbar unter:
|
|
- `https://voicelog.aquantico.lan` (via Traefik)
|
|
- `http://127.0.0.1:8094` (direkt)
|
|
|
|
## Neustart nach Code-Änderungen
|
|
|
|
```bash
|
|
sudo podman rm -f diarization-ui
|
|
sudo podman compose up -d --build
|
|
```
|
|
|
|
## Image in Registry publizieren
|
|
|
|
```bash
|
|
podman build -t registry.aquantico.lan/claw/diarization-ui:latest .
|
|
podman push registry.aquantico.lan/claw/diarization-ui:latest
|
|
```
|
|
|
|
## Datenpersistenz
|
|
|
|
Alle persistenten Daten liegen im Podman-Volume `diarization-ui_diarization_ui_data`, gemountet unter `/data` im Container:
|
|
|
|
```
|
|
/data/ui.db — SQLite-Datenbank
|
|
/data/jobs/ — Temporäre Upload-Dateien (werden nach Verarbeitung gelöscht)
|
|
```
|
|
|
|
> **Achtung:** Beim Neuerstellen des Containers kein `podman volume rm` ausführen — sonst gehen alle Daten verloren. Nur `podman rm -f diarization-ui` reicht.
|
|
|
|
## Daten-Backup
|
|
|
|
```bash
|
|
sudo podman cp diarization-ui:/data/ui.db ./ui.db.backup
|
|
```
|
|
|
|
## Volumes prüfen
|
|
|
|
```bash
|
|
sudo podman volume ls | grep diarization
|
|
```
|
|
|
|
Das korrekte Volume heißt `diarization-ui_diarization_ui_data` (nicht `voicelog_diarization_ui_data`, das ist ein veraltetes Volume aus einer früheren Benennung).
|
|
|
|
## Logs
|
|
|
|
```bash
|
|
sudo podman logs -f diarization-ui
|
|
```
|
|
|
|
## docker-compose.yml Struktur
|
|
|
|
```yaml
|
|
services:
|
|
diarization-ui:
|
|
networks: [traefik]
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.openwebui.rule=Host(`voicelog.aquantico.lan`)
|
|
- traefik.http.routers.openwebui.entrypoints=websecure
|
|
- traefik.http.routers.openwebui.tls=true
|
|
- traefik.http.services.openwebui.loadbalancer.server.port=8094
|
|
|
|
networks:
|
|
traefik:
|
|
external: true
|
|
```
|
|
|
|
## Lokale Entwicklung (ohne Docker/Podman)
|
|
|
|
```bash
|
|
pip install -r requirements.txt
|
|
API_BASE=http://... OLLAMA_BASE_URL=http://... DB_PATH=./ui.db \
|
|
uvicorn app:app --host 0.0.0.0 --port 8094 --reload
|
|
```
|