add copilot instructions for better use of AI-models
This commit is contained in:
@@ -194,11 +194,17 @@ chmod 755 mosquitto/config mosquitto/data mosquitto/log
|
||||
nano .env
|
||||
|
||||
# Wichtige Anpassungen:
|
||||
# API_URL=http://YOUR_SERVER_IP:8000
|
||||
# DB_HOST=db (sollte bereits korrekt sein)
|
||||
# VITE_API_URL=https://YOUR_SERVER_HOST/api # Für Dashboard-Build (Production)
|
||||
# DB_HOST=db # In Containern immer 'db'
|
||||
# DB_CONN=mysql+pymysql://${DB_USER}:${DB_PASSWORD}@db/${DB_NAME}
|
||||
# Alle Passwörter für Produktion ändern
|
||||
```
|
||||
|
||||
Hinweise:
|
||||
- Eine Vorlage `.env.example` liegt im Repo. Kopiere sie als Ausgangspunkt: `cp .env.example .env`.
|
||||
- Für lokale Entwicklung lädt `server/database.py` die `.env`, wenn `ENV=development` gesetzt ist.
|
||||
- In Produktion verwaltet Compose/Container die Variablen; kein automatisches `.env`-Load im Code nötig.
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Phase 3: System-Start und Konfiguration
|
||||
@@ -252,6 +258,41 @@ docker compose logs dashboard
|
||||
docker compose logs mqtt
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🧪 Quickstart (Entwicklung)
|
||||
|
||||
Schneller Start der Entwicklungsumgebung mit automatischen Proxys und Hot-Reload.
|
||||
|
||||
```bash
|
||||
# Im Repository-Root
|
||||
# 1) .env aus Vorlage erzeugen (lokal, falls noch nicht vorhanden)
|
||||
cp -n .env.example .env
|
||||
|
||||
# 2) Dev-Stack starten (verwendet docker-compose.yml + docker-compose.override.yml)
|
||||
docker compose up -d --build
|
||||
|
||||
# 3) Status & Logs
|
||||
docker compose ps
|
||||
docker compose logs -f server
|
||||
docker compose logs -f dashboard
|
||||
docker compose logs -f mqtt
|
||||
|
||||
# 4) Stack stoppen
|
||||
docker compose down
|
||||
```
|
||||
|
||||
Erreichbarkeit (Dev):
|
||||
- Dashboard (Vite): http://localhost:5173
|
||||
- API (Flask Dev): http://localhost:8000/api
|
||||
- API Health: http://localhost:8000/health
|
||||
- Screenshots: http://localhost:8000/screenshots/<uuid>.jpg
|
||||
- MQTT: localhost:1883 (WebSocket: localhost:9001)
|
||||
|
||||
Hinweise:
|
||||
- `ENV=development` lädt `.env` automatisch in `server/database.py`.
|
||||
- Vite proxy routet `/api` und `/screenshots` in Dev direkt auf die API (siehe `dashboard/vite.config.ts`).
|
||||
|
||||
### 12. Automatischer Start (optional)
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user