Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
CannonLock committed Sep 13, 2024
1 parent e84973e commit b703814
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM python:3.8

# Install cron
RUN apt-get update && apt-get install -y cron
RUN apt-get update -y && apt-get install -y cron

# Set the working directory
WORKDIR /app
Expand All @@ -10,6 +10,7 @@ WORKDIR /app
COPY ./import-script/import_logs.py import_logs.py
COPY ./import.sh import.sh
COPY ./logrotate.sh logrotate.sh
COPY ./crontab /etc/cron.d/import-cron

# Make the scripts executable
RUN chmod +x import.sh logrotate.sh
Expand Down
2 changes: 1 addition & 1 deletion crontab
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Run logrotate.sh daily at midnight
0 0 * * * /app/logrotate.sh >> /var/log/cron.log 2>&1
0 0 * * * /app/logrotate.sh >> /var/log/cron.log 2>&1

0 comments on commit b703814

Please sign in to comment.