initial commit

This commit is contained in:
2026-01-13 15:45:44 +01:00
commit 818576c03a
6 changed files with 1049 additions and 0 deletions

35
Dockerfile Normal file
View File

@@ -0,0 +1,35 @@
# Dockerfile for ESPHome Webhook Service
FROM python:3.11-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
# Install ESPHome
RUN pip install --no-cache-dir esphome
# Set working directory
WORKDIR /app
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY app.py .
# Create config directory
RUN mkdir -p /config
# Expose webhook service port
EXPOSE 5000
# Environment variables
ENV ESPHOME_CONFIG_DIR=/config
ENV AUTO_COMPILE=true
ENV AUTO_UPLOAD=false
ENV DEBOUNCE_SECONDS=5
# Run the webhook service
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "2", "--timeout", "600", "app:app"]