modif cron

This commit is contained in:
2024-04-12 15:12:27 +02:00
parent 0f3adecf91
commit a94a0b0fe8
6 changed files with 23 additions and 13 deletions

View File

@@ -3,7 +3,12 @@ FROM python:3.9
WORKDIR /app
COPY . .
RUN pip install --no-cache-dir -r requirements.txt
COPY crons_jobs /etc/cron.d/django_crons_jobs
RUN apt-get update && apt-get install -y cron
RUN chmod 0644 /etc/cron.d/django_crons_jobs && crontab /etc/cron.d/django_crons_jobs && touch /var/log/cron.log && tail -f /var/log/cron.log
RUN apt update && apt install cron && pip install --no-cache-dir -r requirements.txt
RUN python manage.py makemigrations && python manage.py migrate