From 8e473d33d2ac17ba5b7b643c965178edb757aed2 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 25 Jan 2026 10:47:01 +0100 Subject: [PATCH] fix: move generated files to a separate directory --- Dockerfile | 4 +++- main.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index dc6e084..e5ee3f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,11 @@ # Use an official Python runtime as a parent image -FROM python:3.9-slim +FROM python:3.12-slim # Set the working directory in the container WORKDIR /app +RUN mkdir /output + # Copy the dependencies file to the working directory COPY requirements.txt . diff --git a/main.py b/main.py index f5a6a62..9aa98d7 100644 --- a/main.py +++ b/main.py @@ -8,8 +8,8 @@ from datetime import datetime # --- Configuration --- HA_URL = os.environ.get("HA_URL") HA_TOKEN = os.environ.get("HA_TOKEN") -DATA_FILE = "sensor_data.json" -HTML_FILE = "index.html" +DATA_FILE = "/output/sensor_data.json" +HTML_FILE = "/output/index.html" TEMPLATE_DIR = "templates" # --- Error Handling ---