Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
deb26c4945
|
30
apps/homekit/Dockerfile
Normal file
30
apps/homekit/Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
# Environment defaults (can be overridden at runtime)
|
||||
ENV PYTHONUNBUFFERED=1 \
|
||||
HOMEKIT_NAME="Home Automation Bridge" \
|
||||
HOMEKIT_PIN="031-45-154" \
|
||||
HOMEKIT_PORT="51826" \
|
||||
API_BASE="http://api:8001" \
|
||||
HOMEKIT_API_TOKEN="" \
|
||||
HOMEKIT_PERSIST_FILE="/data/homekit.state"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy only requirements first for better build caching
|
||||
COPY apps/homekit/requirements.txt ./apps/homekit/requirements.txt
|
||||
|
||||
RUN pip install --no-cache-dir --upgrade pip \
|
||||
&& pip install --no-cache-dir -r apps/homekit/requirements.txt
|
||||
|
||||
# Copy full source tree
|
||||
COPY . /app
|
||||
|
||||
# Expose HomeKit TCP port (mDNS uses UDP 5353 via host network)
|
||||
EXPOSE 51826/tcp
|
||||
|
||||
# Volume for persistent HomeKit state (pairings etc.)
|
||||
VOLUME ["/data"]
|
||||
|
||||
# Start the HomeKit bridge
|
||||
CMD ["python", "-m", "apps.homekit.main"]
|
||||
42
apps/homekit/docker-compose.yaml
Normal file
42
apps/homekit/docker-compose.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
homekit-bridge:
|
||||
build:
|
||||
context: ../..
|
||||
dockerfile: apps/homekit/Dockerfile
|
||||
container_name: homekit-bridge
|
||||
|
||||
# Host-Netzwerk, damit mDNS/Bonjour im LAN sichtbar ist
|
||||
network_mode: host
|
||||
|
||||
# Environment-Variablen für die Bridge-Konfiguration
|
||||
environment:
|
||||
# Anzeigename der Bridge in HomeKit
|
||||
- HOMEKIT_NAME=Home Automation Bridge
|
||||
# HomeKit-Setup-PIN (Format XXX-YY-ZZZ)
|
||||
- HOMEKIT_PIN=031-45-154
|
||||
# TCP-Port, auf dem HAP-Python lauscht (muss zum EXPOSE passen)
|
||||
- HOMEKIT_PORT=51826
|
||||
|
||||
# Basis-URL deiner bestehenden API (anpassen!)
|
||||
# Beispiel: UI/API im gleichen Docker-Netzwerk → http://api:8001
|
||||
# Oder IP/Host im LAN → z.B. http://192.168.1.10:8001
|
||||
- API_BASE=http://172.19.1.11:8001
|
||||
|
||||
# Optionales API-Token, falls deine API Auth nutzt
|
||||
- HOMEKIT_API_TOKEN=
|
||||
|
||||
# Pfad für Persistenz der HomeKit-Daten im Container
|
||||
- HOMEKIT_PERSIST_FILE=/data/homekit.state
|
||||
|
||||
# Persistentes Volume für Pairing-Infos (homekit.state)
|
||||
volumes:
|
||||
- homekit_data:/data
|
||||
|
||||
# Neustart-Policy
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
homekit_data:
|
||||
driver: local
|
||||
Reference in New Issue
Block a user