apt cron
All checks were successful
Build and Push Docker Images / build (push) Successful in 48s

This commit is contained in:
christian 2024-06-01 17:59:08 +02:00
parent b80839e448
commit dd10015927

View File

@ -11,6 +11,11 @@ COPY requirements.txt /app/
# Install the required Python packages
RUN pip install -r requirements.txt
# Install cron and create log file
RUN apt-get update \
&& apt-get -y install cron \
&& touch /var/log/cron.log
# Copy the cron job file into the cron directory
COPY cronjob /etc/cron.d/jobindex-cron
@ -20,8 +25,5 @@ RUN chmod 0644 /etc/cron.d/jobindex-cron
# Apply cron job
RUN crontab /etc/cron.d/jobindex-cron
# Create the log file to be able to run tail
RUN touch /var/log/cron.log
# Run the command on container startup
CMD cron && tail -f /var/log/cron.log
CMD ["cron", "-f"]