diff --git a/docker/Dockerfile b/docker/Dockerfile index f626f3a..7c7cda6 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,5 +1,9 @@ FROM alpine:3.16 + +COPY logrotate-cron /etc/logrotate.d + RUN \ - apk -U add python3 py3-pip py3-requests py3-dateutil py3-beautifulsoup4 && \ + apk -U add python3 py3-pip py3-requests py3-dateutil py3-beautifulsoup4 logrotate && \ pip3 install fdb mysql-connector-python==8.0.29 telepot caldav +ENTRYPOINT ["/usr/sbin/crond", "-f", "-d8", "-L", "/var/log/cron.log"] diff --git a/docker/logrotate-cron b/docker/logrotate-cron new file mode 100644 index 0000000..094540a --- /dev/null +++ b/docker/logrotate-cron @@ -0,0 +1,8 @@ +/var/log/cron.log { + rotate 4 + compress + delaycompress + missingok + notifempty + sharedscripts +} \ No newline at end of file