Add basic dockerfile and compose

This commit is contained in:
Meatballs
2024-03-19 10:22:54 +00:00
parent 295c55c995
commit 7a73b7e164
2 changed files with 22 additions and 0 deletions

16
Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
FROM python:3.10-slim
WORKDIR /app
COPY requirements.txt ./
RUN apt-get update && \
apt-get install -y --no-install-recommends gcc python3-dev libssl-dev && \
pip3 install -r requirements.txt && \
apt-get remove -y gcc python3-dev libssl-dev && \
apt-get autoremove -y
COPY hc2mqtt hc-login HCDevice.py HCSocket.py ./
ENTRYPOINT ["python3"]
CMD ["hc2mqtt", "/config/config.json"]

6
compose.yaml Normal file
View File

@@ -0,0 +1,6 @@
services:
app:
build: .
restart: on-failure
volumes:
- ./config:/config