feat: make stop/start/restart + Doku servicefreundlicher

Makefile: neue Targets 'stop' (Gateway + llama.cpp), 'start' (llm-up + run),
'restart' (stop + start). CONTAINER_NAME als überschreibbare Variable.
BEDIENUNGSANLEITUNG § 4: neuer Schnellbefehle-Block (§ 4.0) mit Tabellen für
alle Start-/Stop-Situationen; § 4.8 Stoppen und § 4.9 Neustart als dedizierte
Abschnitte. README: Stoppen, Neu starten und make-Targets aktualisiert.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Dieter Schlüter 2026-06-19 12:58:54 +02:00
commit a54daecbc8
3 changed files with 141 additions and 2 deletions

View file

@ -35,7 +35,7 @@ funktioniert trotzdem, die Ausgabe ist dann unformatiert.
1. [Was ist dieses System?](#1-was-ist-dieses-system)
2. [Installation und Einrichtung](#2-installation-und-einrichtung)
3. [Betriebsprofile wählen](#3-betriebsprofile-wählen)
4. [Starten und Stoppen](#4-starten-und-stoppen) — [4.5 llama.cpp](#45-llamacpp-server-für-profil-hybridlocal-dev) · [4.6 Ollama](#46-ollama-alternative-zu-llamacpp-kein-docker-nötig) · [4.7 Wechseln](#47-zwischen-llamacpp-und-ollama-wechseln)
4. [Starten und Stoppen](#4-starten-und-stoppen) — [4.0 Schnellbefehle](#40-schnellbefehle-überblick) · [4.5 llama.cpp](#45-llamacpp-server-für-profil-hybridlocal-dev) · [4.6 Ollama](#46-ollama-alternative-zu-llamacpp-kein-docker-nötig) · [4.7 Wechseln](#47-zwischen-llamacpp-und-ollama-wechseln) · [4.8 Stoppen](#48-alles-stoppen) · [4.9 Neustart](#49-komplett-neustart)
**Bedienung**
5. [Das System benutzen](#5-das-system-benutzen)
@ -368,6 +368,41 @@ curl -s $URL/api/config | jq '{profile, default_route}'
> 🔧 Admin
### 4.0 Schnellbefehle (Überblick)
Die wichtigsten Kommandos auf einen Blick — Details in den Abschnitten darunter.
**Starten:**
| Situation | Kommando |
|-----------|----------|
| Profil `cloud` — nur Gateway | `make run` |
| Profil `hybrid` / `local-dev` — llama.cpp + Gateway | `make start` |
| Profil `hybrid` / `local-dev` — Ollama + Gateway | `sudo systemctl start ollama && make run` |
| systemd-Dienst starten | `systemctl --user start voice-assistant` |
**Stoppen:**
| Situation | Kommando |
|-----------|----------|
| Gateway im Vordergrund | **Strg + C** |
| Gateway im Hintergrund / systemd | `make stop` |
| Alles (Gateway + llama.cpp) | `make stop` |
| llama.cpp allein | `make llm-down` |
| Ollama allein | `sudo systemctl stop ollama` |
**Neu starten (alles):**
```bash
make restart # make stop + make start (llama.cpp + Gateway)
# Nur Gateway neu starten (llama.cpp läuft weiter):
systemctl --user restart voice-assistant # systemd
# oder: Strg+C und make run # Vordergrund
```
---
### 4.1 Vordergrund (Entwicklung/Test)
```bash
@ -576,6 +611,63 @@ VA_PROFILE=hybrid make run
---
### 4.8 Alles stoppen
```bash
make stop
```
Ein Befehl stoppt alle Voice-Assistant-Komponenten:
- Gateway (ob im Vordergrund gestartet, im Hintergrund oder als systemd-Dienst)
- llama.cpp-Docker-Container (`va_llm`)
Ollama ist ein systemd-Dienst und muss separat gestoppt werden:
```bash
sudo systemctl stop ollama
```
**Einzelne Komponenten stoppen:**
```bash
# Nur Gateway (Vordergrund):
Strg + C
# Nur Gateway (Hintergrund):
pkill -f "uvicorn app.main:app"
# Nur Gateway (systemd):
systemctl --user stop voice-assistant
# Nur llama.cpp:
make llm-down
# oder direkt:
docker rm -f va_llm
# Nur Ollama:
sudo systemctl stop ollama
```
### 4.9 Komplett-Neustart
```bash
make restart
```
Entspricht `make stop` gefolgt von `make start` (llama.cpp + Gateway). Sinnvoll nach
Konfigurationsänderungen, die einen Neustart erfordern (z. B. neue `.env`-Werte).
**Nur Gateway neu starten** (llama.cpp läuft weiter — schneller):
```bash
systemctl --user restart voice-assistant # systemd-Betrieb
# oder: Strg+C → make run # Vordergrund-Betrieb
```
> ⚠️ `make restart` startet llama.cpp neu (Modell lädt ~5 Min.). Wenn nur der Gateway-
> Code oder die Konfiguration geändert wurde, ist `systemctl --user restart voice-assistant`
> deutlich schneller.
---
## 5. Das System benutzen
> 👤 Endnutzer
@ -1938,6 +2030,8 @@ in `app/dependencies.py` + Implementierung in `app/providers/`. → [Architektur
| local-dev-Profil | § 3.3 |
| Ollama starten | § 4.6 |
| Ollama ↔ llama.cpp wechseln | § 4.7 |
| Stoppen (alle Varianten) | § 4.8 |
| Neustart | § 4.9 |
| Metriken / Monitoring | § 9.2, Anhang B.1 |
| Mikrofon → Audio-Geräte | § 6.7 |
| Notfall-Erkennung | § 10 |