22 lines
549 B
Docker
22 lines
549 B
Docker
# Use an official Python runtime as a base image
|
|
FROM python:3.9
|
|
|
|
# Set working directory in the container
|
|
WORKDIR /app
|
|
|
|
# Copy requirements file and install dependencies
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy the rest of the application code
|
|
COPY . .
|
|
|
|
# Expose the port for the PDF server
|
|
EXPOSE 8000
|
|
|
|
# Environment variables for Google API credentials
|
|
ENV GOOGLE_APPLICATION_CREDENTIALS="/app/credentials.json"
|
|
|
|
# Run the script as a daemon to check emails and download PDFs
|
|
CMD ["python", "daemon.py"]
|