Claude übernimmt

This commit is contained in:
chk
2026-06-08 20:34:43 +02:00
parent 53db55ba36
commit 4358857cf2
9 changed files with 515 additions and 12 deletions

View File

@@ -80,6 +80,14 @@ print(resp.json()["joints"])
| `/v1/health` | GET | Status |
| `/v1/config` | GET | aktive Konfiguration |
**Maschinenlesbares Schema / interaktive Doku** (automatisch von FastAPI):
| URL | Zweck |
|-----|-------|
| `/openapi.json` | OpenAPI-Spezifikation (für Client-Generatoren) |
| `/docs` | Swagger-UI (interaktiv ausprobieren) |
| `/redoc` | ReDoc-Ansicht |
**Response:**
```json
@@ -108,14 +116,27 @@ print(resp.json()["joints"])
## Deployment (Docker / Portainer)
**Volume:**
> **Pflichtschritt zuerst:** `config/robot.json` muss als **Datei** existieren, bevor
> der Container startet. Vorlage kopieren und mit der echten Konfiguration füllen:
>
> ```bash
> cp config/robot.json.example config/robot.json
> ```
>
> ⚠️ Fehlt die Datei, legt Docker am Mount-Pfad ein **leeres Verzeichnis** an.
> Der Server startet dann zwar, aber jeder `/v1/estimate` liefert **500**
> (`IsADirectoryError`) und `/v1/config` ebenfalls 500. Genau dann diesen
> Pflichtschritt nachholen und den Container neu starten.
**Volume** (Pfad muss zur tatsächlichen Datei zeigen, vgl. `docker-compose.yaml`):
```yaml
- /opt/approbot/config/robot.json:/config/robot.json:ro
- ./config/robot.json:/config/robot.json:ro
```
**Healthcheck:**
**Start & Healthcheck:**
```bash
curl http://<host>:8446/v1/health
docker compose up -d
curl http://<host>:8446/v1/health # {"status":"ok","version":"1.0.0"}
```
---