fix: move generated files to a separate directory
This commit is contained in:
@ -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 .
|
||||
|
||||
|
||||
4
main.py
4
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 ---
|
||||
|
||||
Reference in New Issue
Block a user