Add docker files
This commit is contained in:
29
Dockerfile
Normal file
29
Dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user