From 7a73b7e16413b100b98920851983421e3a89d791 Mon Sep 17 00:00:00 2001 From: Meatballs Date: Tue, 19 Mar 2024 10:22:54 +0000 Subject: [PATCH] Add basic dockerfile and compose --- Dockerfile | 16 ++++++++++++++++ compose.yaml | 6 ++++++ 2 files changed, 22 insertions(+) create mode 100644 Dockerfile create mode 100644 compose.yaml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d79fe20 --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..07c2c2b --- /dev/null +++ b/compose.yaml @@ -0,0 +1,6 @@ +services: + app: + build: . + restart: on-failure + volumes: + - ./config:/config