Skip to content

Commit

Permalink
Docker update the daily, weekly, and monthly logrotate times to midni…
Browse files Browse the repository at this point in the history
…ght IST (#5282)

**Story card:**
[sc-11170](https://app.shortcut.com/simpledotorg/story/11170)

## This addresses

Enable logrotate during nonpeak hours
  • Loading branch information
roypeter authored Sep 22, 2023
1 parent e7b7335 commit be527aa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .docker/prod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ RUN rm /etc/nginx/sites-enabled/default
# Add nginx site for simple-server
ADD .docker/config/nginx/webapp.conf /etc/nginx/sites-enabled/webapp.conf

# Update the daily, weekly, and monthly logrotate times to midnight IST
RUN sed -i '/cron.daily/s/25 6/0 20/' /etc/crontab
RUN sed -i '/cron.weekly/s/47 6/30 20/' /etc/crontab
RUN sed -i '/cron.monthly/s/52 6/0 21/' /etc/crontab

# Add logrotate config
ADD .docker/config/logrotate/* /etc/logrotate.d/
RUN chmod 644 /etc/logrotate.d/*
Expand Down

0 comments on commit be527aa

Please sign in to comment.