This commit is contained in:
2025-11-06 16:50:23 +01:00
parent b7efae61c4
commit 6bf8ac3f99
4 changed files with 278 additions and 1 deletions

View File

@@ -51,6 +51,23 @@ docker run --rm -p 8001:8001 \
api:dev
```
**Mit Docker Network (empfohlen für Linux):**
```bash
docker network create home-automation
docker run --rm -p 8001:8001 \
--network home-automation \
--name api \
-v $(pwd)/config:/app/config:ro \
-e MQTT_BROKER=172.16.2.16 \
-e REDIS_HOST=172.23.1.116 \
-e REDIS_DB=8 \
api:dev
```
**Hinweise:**
- **Linux**: Port wird auf `0.0.0.0:8001` gebunden (von überall erreichbar)
- **macOS/finch**: Port wird auf `127.0.0.1:8001` gebunden (nur localhost)
#### Environment Variables
| Variable | Default | Description |

View File

@@ -59,6 +59,16 @@ docker run --rm -p 8010:8010 \
simulator:dev
```
**Mit Docker Network (optional):**
```bash
docker network create home-automation
docker run --rm -p 8010:8010 \
--network home-automation \
--name simulator \
-e MQTT_BROKER=172.16.2.16 \
simulator:dev
```
#### Environment Variables
| Variable | Default | Description |

View File

@@ -37,14 +37,34 @@ docker build -t ui:dev -f apps/ui/Dockerfile .
#### Run Container
**Linux Server (empfohlen):**
```bash
# Mit Docker Network für Container-to-Container Kommunikation
docker network create home-automation
docker run --rm -p 8002:8002 \
--network home-automation \
-e UI_PORT=8002 \
-e API_BASE=http://localhost:8001 \
-e API_BASE=http://api:8001 \
-e BASE_PATH=/ \
ui:dev
```
**macOS mit finch/nerdctl:**
```bash
docker run --rm -p 8002:8002 \
--add-host=host.docker.internal:host-gateway \
-e UI_PORT=8002 \
-e API_BASE=http://host.docker.internal:8001 \
-e BASE_PATH=/ \
ui:dev
```
**Hinweise:**
- **Linux**: Verwende Docker Network und Service-Namen (`http://api:8001`)
- **macOS/finch**: Verwende `host.docker.internal` mit `--add-host` flag
- Die UI macht Server-Side API-Aufrufe beim Rendern der Seite
- Browser-seitige Realtime-Updates (SSE) gehen direkt vom Browser zur API
#### Environment Variables
| Variable | Default | Description |