Compare commits

..

6 Commits
0.1.4 ... 0.1.7

Author SHA1 Message Date
17c9bca8d1 forgotten file 2
All checks were successful
ci/woodpecker/tag/predeploy Pipeline was successful
ci/woodpecker/tag/build/4 Pipeline was successful
ci/woodpecker/tag/build/1 Pipeline was successful
ci/woodpecker/tag/build/3 Pipeline was successful
ci/woodpecker/tag/build/2 Pipeline was successful
ci/woodpecker/tag/deploy/4 Pipeline was successful
ci/woodpecker/tag/deploy/3 Pipeline was successful
ci/woodpecker/tag/deploy/2 Pipeline was successful
ci/woodpecker/tag/deploy/1 Pipeline was successful
ci/woodpecker/tag/ingress Pipeline was successful
2025-12-01 10:43:33 +01:00
c4fc21d760 forgotten file 2025-12-01 10:42:58 +01:00
e902d221ea fix configMap
All checks were successful
ci/woodpecker/tag/predeploy Pipeline was successful
ci/woodpecker/tag/build/1 Pipeline was successful
ci/woodpecker/tag/build/4 Pipeline was successful
ci/woodpecker/tag/build/2 Pipeline was successful
ci/woodpecker/tag/build/3 Pipeline was successful
ci/woodpecker/tag/deploy/3 Pipeline was successful
ci/woodpecker/tag/deploy/1 Pipeline was successful
ci/woodpecker/tag/deploy/2 Pipeline was successful
ci/woodpecker/tag/deploy/4 Pipeline was successful
2025-12-01 10:39:16 +01:00
e19bffc90c ci fix
All checks were successful
ci/woodpecker/tag/predeploy Pipeline was successful
ci/woodpecker/tag/build/4 Pipeline was successful
ci/woodpecker/tag/build/1 Pipeline was successful
ci/woodpecker/tag/build/3 Pipeline was successful
ci/woodpecker/tag/build/2 Pipeline was successful
ci/woodpecker/tag/deploy/1 Pipeline was successful
ci/woodpecker/tag/deploy/3 Pipeline was successful
ci/woodpecker/tag/deploy/2 Pipeline was successful
ci/woodpecker/tag/deploy/4 Pipeline was successful
2025-12-01 10:21:52 +01:00
5a13183123 homekit
All checks were successful
ci/woodpecker/push/build/3 Pipeline was 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/3 Pipeline was successful
ci/woodpecker/push/deploy/1 Pipeline was successful
ci/woodpecker/push/deploy/2 Pipeline was successful
ci/woodpecker/push/deploy/4 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
12 changed files with 118 additions and 20 deletions

View File

@@ -1,3 +1,6 @@
when:
event: [tag]
matrix: matrix:
APP: APP:
- ui - ui

View File

@@ -1,3 +1,10 @@
when:
event: [tag]
depends_on:
- build
- predeploy
matrix: matrix:
APP: APP:
- ui - ui
@@ -24,6 +31,3 @@ steps:
exclude: exclude:
- refs/tags/*-configchange - refs/tags/*-configchange
depends_on:
- build
- predeploy

23
.woodpecker/ingress.yml Normal file
View File

@@ -0,0 +1,23 @@
when:
event: [tag]
depends_on:
- deploy
steps:
apply_ingress:
image: quay.io/wollud1969/k8s-admin-helper:0.3.4
environment:
KUBE_CONFIG_CONTENT:
from_secret: kube_config
NAMESPACE: "homea2"
commands:
- printf "$KUBE_CONFIG_CONTENT" > /tmp/kubeconfig
- export KUBECONFIG=/tmp/kubeconfig
- kubectl apply -f deployment/ingress.yaml -n $NAMESPACE
when:
event: [tag]
ref:
exclude:
- refs/tags/*-configchange

View File

@@ -1,3 +1,6 @@
when:
event: [tag]
steps: steps:
create_namespace: create_namespace:
image: quay.io/wollud1969/k8s-admin-helper:0.3.4 image: quay.io/wollud1969/k8s-admin-helper:0.3.4

View File

@@ -10,7 +10,9 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
MQTT_PORT=1883 \ MQTT_PORT=1883 \
REDIS_HOST=localhost \ REDIS_HOST=localhost \
REDIS_PORT=6379 \ REDIS_PORT=6379 \
REDIS_DB=0 REDIS_DB=0 \
REDIS_CHANNEL=ui:updates
# Create non-root user # Create non-root user
RUN addgroup -g 10001 -S app && \ RUN addgroup -g 10001 -S app && \

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,28 @@
services:
homekit-bridge:
build:
context: ../..
dockerfile: apps/homekit/Dockerfile
container_name: homekit-bridge
# Required for mDNS/Bonjour to work properly
network_mode: host
environment:
- HOMEKIT_NAME=Home Automation Bridge
- HOMEKIT_PIN=031-45-154
- HOMEKIT_PORT=51826
- API_BASE=http://homea2-api-internal.hottis.de
- HOMEKIT_API_TOKEN=
- HOMEKIT_PERSIST_FILE=/data/homekit.state
volumes:
- homekit_data:/data
restart: unless-stopped
volumes:
homekit_data:
driver: local

View File

@@ -6,7 +6,7 @@ FROM python:3.14-alpine
# Prevent Python from writing .pyc files and enable unbuffered output # Prevent Python from writing .pyc files and enable unbuffered output
ENV PYTHONDONTWRITEBYTECODE=1 \ ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \ PYTHONUNBUFFERED=1 \
RULES_CONFIG=config/rules.yaml \ RULES_CONFIG=/app/config/rules.yaml \
MQTT_BROKER=172.16.2.16 \ MQTT_BROKER=172.16.2.16 \
MQTT_PORT=1883 \ MQTT_PORT=1883 \
REDIS_HOST=localhost \ REDIS_HOST=localhost \

View File

@@ -52,11 +52,6 @@ spec:
configMapKeyRef: configMapKeyRef:
name: home-automation-environment name: home-automation-environment
key: SHARED_REDIS_DB key: SHARED_REDIS_DB
- name: REDIS_CHANNEL
valueFrom:
configMapKeyRef:
name: home-automation-environment
key: API_REDIS_CHANNEL
volumeMounts: volumeMounts:
- name: config-volume - name: config-volume
mountPath: /app/config mountPath: /app/config

View File

@@ -16,8 +16,6 @@ data:
UI_API_BASE: "https://homea2-api.hottis.de" UI_API_BASE: "https://homea2-api.hottis.de"
UI_BASE_PATH: "/" UI_BASE_PATH: "/"
# API specific environment variables
API_REDIS_CHANNEL: "ui:updates"
# Rules specific environment variables
RULES_RULES_CONFIG: "/app/config/rules.yaml"

View File

@@ -59,4 +59,21 @@ spec:
services: services:
- name: api - name: api
port: 80 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

View File

@@ -48,11 +48,6 @@ spec:
configMapKeyRef: configMapKeyRef:
name: home-automation-environment name: home-automation-environment
key: SHARED_REDIS_DB key: SHARED_REDIS_DB
- name: RULES_CONFIG
valueFrom:
configMapKeyRef:
name: home-automation-environment
key: RULES_RULES_CONFIG
volumeMounts: volumeMounts:
- name: config-volume - name: config-volume
mountPath: /app/config mountPath: /app/config