Claude übernimmt
This commit is contained in:
29
README.md
29
README.md
@@ -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"}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user