Compare commits

..

2 Commits
0.1.4 ... main

Author SHA1 Message Date
5a13183123 homekit
All checks were successful
ci/woodpecker/push/build/1 Pipeline was successful
ci/woodpecker/push/predeploy Pipeline was successful
ci/woodpecker/push/build/2 Pipeline was successful
ci/woodpecker/push/build/4 Pipeline was successful
ci/woodpecker/push/deploy/2 Pipeline was successful
ci/woodpecker/push/deploy/4 Pipeline was successful
ci/woodpecker/push/deploy/3 Pipeline was successful
ci/woodpecker/push/deploy/1 Pipeline was successful
ci/woodpecker/push/build/3 Pipeline was successful
2025-11-30 21:56:52 +01:00
deb26c4945 homekit dockerfile
All checks were successful
ci/woodpecker/push/build/2 Pipeline was successful
ci/woodpecker/push/build/4 Pipeline was successful
ci/woodpecker/push/predeploy Pipeline was successful
ci/woodpecker/push/build/3 Pipeline was successful
ci/woodpecker/push/build/1 Pipeline was successful
ci/woodpecker/push/deploy/4 Pipeline was successful
ci/woodpecker/push/deploy/1 Pipeline was successful
ci/woodpecker/push/deploy/3 Pipeline was successful
ci/woodpecker/push/deploy/2 Pipeline was successful
2025-11-30 20:15:34 +01:00
3 changed files with 90 additions and 1 deletions

30
apps/homekit/Dockerfile Normal file
View 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"]

View File

@@ -0,0 +1,41 @@
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://homea2-api-internal.hottis.de
# 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

View File

@@ -59,4 +59,22 @@ spec:
services:
- name: api
port: 80
---
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: api-internal
spec:
ingressClassName: traefik-internal
rules:
- host: homea2-api-internal.hottis.de
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: api
port:
number: 80