Files
wetterserver/Dockerfile
2025-08-04 11:27:31 +00:00

31 lines
689 B
Docker

FROM python:3.10-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
tesseract-ocr \
tesseract-ocr-deu \
cron \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy project files
COPY . /app
# Install Python packages
RUN pip install --no-cache-dir -r requirements.txt
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV TESSDATA_PREFIX=/usr/share/tesseract-ocr/5/tessdata
# Set up cron job
RUN echo "10 7 * * * bash /app/run_wetter.sh >> /app/logs/cron.log 2>&1" > wetter-cron \
&& crontab wetter-cron
# Make shell script executable
RUN chmod +x /app/run_wetter.sh
# Start cron in foreground
CMD ["cron", "-f"]