-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (21 loc) · 798 Bytes
/
Copy pathDockerfile
File metadata and controls
29 lines (21 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM python:3.11-slim
LABEL maintainer="wrees"
LABEL description="MQTT bridge for Hisense/Vidaa TV control"
WORKDIR /app
# Install system dependencies (procps for pgrep health check)
RUN apt-get update && apt-get install -y --no-install-recommends procps \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application
COPY hisense_tv/ ./hisense_tv/
COPY hisense2mqtt/ ./hisense2mqtt/
COPY certs/ ./certs/
# Default config location
ENV CONFIG_PATH=/app/config.yaml
# Health check - verify Python process is running
HEALTHCHECK --interval=60s --timeout=10s --start-period=10s --retries=3 \
CMD pgrep -f "python.*hisense2mqtt" || exit 1
# Run the bridge
CMD ["python", "-m", "hisense2mqtt"]