19 lines
509 B
Text
19 lines
509 B
Text
|
|
FROM python:3.12-slim
|
||
|
|
|
||
|
|
WORKDIR /app
|
||
|
|
|
||
|
|
RUN apt-get update && apt-get install -y --no-install-recommends dcron && rm -rf /var/lib/apt/lists/*
|
||
|
|
|
||
|
|
COPY requirements.txt .
|
||
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
||
|
|
|
||
|
|
COPY . .
|
||
|
|
|
||
|
|
# Write cron job: refresh podcast feeds every hour
|
||
|
|
RUN echo "0 * * * * root cd /app && python manage.py refresh_feeds >> /var/log/cron.log 2>&1" \
|
||
|
|
> /etc/cron.d/podcast-refresh && \
|
||
|
|
chmod 0644 /etc/cron.d/podcast-refresh && \
|
||
|
|
touch /var/log/cron.log
|
||
|
|
|
||
|
|
CMD ["dcron", "-f"]
|