Add docker files

This commit is contained in:
kbe
2025-07-20 16:38:14 +02:00
parent 5dcc2a89ae
commit 5fd084702f
4 changed files with 56 additions and 7 deletions

29
Dockerfile Normal file
View File

@@ -0,0 +1,29 @@
# Use the official Python image from Docker Hub
FROM python:3.11-slim
# Set the working directory
WORKDIR /app
# Set environment variables using the ARG values
ENV CROSSFIT_USERNAME=${CROSSFIT_USERNAME}
ENV CROSSFIT_PASSWORD=${CROSSFIT_PASSWORD}
ENV EMAIL_FROM=${EMAIL_FROM}
ENV EMAIL_TO=${EMAIL_TO}
ENV EMAIL_PASSWORD=${EMAIL_PASSWORD}
ENV TELEGRAM_TOKEN=${TELEGRAM_TOKEN}
ENV TELEGRAM_CHAT_ID=${TELEGRAM_CHAT_ID}
# Copy the requirements file
COPY requirements.txt .
# Install the required dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY . .
# Create log directory
RUN mkdir -p log
# Set the entry point to run the main script
ENTRYPOINT ["python", "book_crossfit.py"]