Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
a389edcd87
|
|||
|
17c9bca8d1
|
|||
|
c4fc21d760
|
|||
|
e902d221ea
|
35
.woodpecker/build-homekit.yml
Normal file
35
.woodpecker/build-homekit.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
when:
|
||||
event: [tag]
|
||||
|
||||
steps:
|
||||
build-homekit-arm64:
|
||||
image: docker:27.2.0-dind
|
||||
privileged: true
|
||||
environment:
|
||||
REGISTRY:
|
||||
from_secret: local_registry
|
||||
USERNAME:
|
||||
from_secret: local_username
|
||||
PASSWORD:
|
||||
from_secret: local_password
|
||||
commands:
|
||||
- echo "Logging in to registry $REGISTRY as $USERNAME"
|
||||
- echo "$PASSWORD" | docker login "$REGISTRY" -u "$USERNAME" --password-stdin
|
||||
- docker version
|
||||
- echo "Enabling binfmt for multi-arch builds"
|
||||
- docker run --privileged --rm tonistiigi/binfmt --install all
|
||||
- echo "Creating and bootstrapping buildx builder"
|
||||
- docker buildx create --use --name multiarch-builder || docker buildx use multiarch-builder
|
||||
- docker buildx inspect --bootstrap
|
||||
- export IMAGE_TAG="${FORGE_NAME}/${CI_REPO}/homekit:${CI_COMMIT_TAG}"
|
||||
- echo "Building ARM64 image: $IMAGE_TAG"
|
||||
- docker buildx build \
|
||||
--platform linux/arm64 \
|
||||
-f apps/homekit/Dockerfile \
|
||||
-t "$IMAGE_TAG" \
|
||||
--push .
|
||||
when:
|
||||
event: [tag]
|
||||
ref:
|
||||
exclude:
|
||||
- refs/tags/*-configchange
|
||||
23
.woodpecker/ingress.yml
Normal file
23
.woodpecker/ingress.yml
Normal 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
|
||||
|
||||
@@ -10,7 +10,9 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
MQTT_PORT=1883 \
|
||||
REDIS_HOST=localhost \
|
||||
REDIS_PORT=6379 \
|
||||
REDIS_DB=0
|
||||
REDIS_DB=0 \
|
||||
REDIS_CHANNEL=ui:updates
|
||||
|
||||
|
||||
# Create non-root user
|
||||
RUN addgroup -g 10001 -S app && \
|
||||
|
||||
@@ -6,7 +6,7 @@ FROM python:3.14-alpine
|
||||
# Prevent Python from writing .pyc files and enable unbuffered output
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
RULES_CONFIG=config/rules.yaml \
|
||||
RULES_CONFIG=/app/config/rules.yaml \
|
||||
MQTT_BROKER=172.16.2.16 \
|
||||
MQTT_PORT=1883 \
|
||||
REDIS_HOST=localhost \
|
||||
|
||||
@@ -52,11 +52,6 @@ spec:
|
||||
configMapKeyRef:
|
||||
name: home-automation-environment
|
||||
key: SHARED_REDIS_DB
|
||||
- name: REDIS_CHANNEL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: home-automation-environment
|
||||
key: API_REDIS_CHANNEL
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /app/config
|
||||
|
||||
@@ -16,8 +16,6 @@ data:
|
||||
UI_API_BASE: "https://homea2-api.hottis.de"
|
||||
UI_BASE_PATH: "/"
|
||||
|
||||
# API specific environment variables
|
||||
API_REDIS_CHANNEL: "ui:updates"
|
||||
|
||||
# Rules specific environment variables
|
||||
RULES_RULES_CONFIG: "/app/config/rules.yaml"
|
||||
|
||||
|
||||
@@ -60,7 +60,6 @@ spec:
|
||||
- name: api
|
||||
port: 80
|
||||
---
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
|
||||
@@ -48,11 +48,6 @@ spec:
|
||||
configMapKeyRef:
|
||||
name: home-automation-environment
|
||||
key: SHARED_REDIS_DB
|
||||
- name: RULES_CONFIG
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: home-automation-environment
|
||||
key: RULES_RULES_CONFIG
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /app/config
|
||||
|
||||
Reference in New Issue
Block a user