fix: move generated files to a separate directory

This commit is contained in:
Adam
2026-01-25 10:47:01 +01:00
parent 0bbf01e007
commit 8e473d33d2
2 changed files with 5 additions and 3 deletions

View File

@ -1,9 +1,11 @@
# Use an official Python runtime as a parent image # 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 # Set the working directory in the container
WORKDIR /app WORKDIR /app
RUN mkdir /output
# Copy the dependencies file to the working directory # Copy the dependencies file to the working directory
COPY requirements.txt . COPY requirements.txt .

View File

@ -8,8 +8,8 @@ from datetime import datetime
# --- Configuration --- # --- Configuration ---
HA_URL = os.environ.get("HA_URL") HA_URL = os.environ.get("HA_URL")
HA_TOKEN = os.environ.get("HA_TOKEN") HA_TOKEN = os.environ.get("HA_TOKEN")
DATA_FILE = "sensor_data.json" DATA_FILE = "/output/sensor_data.json"
HTML_FILE = "index.html" HTML_FILE = "/output/index.html"
TEMPLATE_DIR = "templates" TEMPLATE_DIR = "templates"
# --- Error Handling --- # --- Error Handling ---