add log rotate
This commit is contained in:
+9
-3
@@ -1,16 +1,22 @@
|
||||
FROM php:8.2-cli
|
||||
|
||||
ENV TZ=Europe/Warsaw
|
||||
|
||||
RUN echo "date.timezone = Europe/Warsaw" > /usr/local/etc/php/conf.d/timezone.ini
|
||||
COPY --chown=www-data ./project /var/www/html
|
||||
|
||||
#cron
|
||||
RUN apt-get update && apt-get -y install cron
|
||||
RUN apt-get install -y --no-install-recommends dnsutils \
|
||||
RUN apt-get install -y --no-install-recommends dnsutils logrotate\
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY ./service/crontab /etc/cron.d/maincron
|
||||
COPY ./service/logrotate /etc/logrotate.d/cron-log
|
||||
|
||||
RUN chmod 0644 /etc/cron.d/maincron
|
||||
RUN crontab /etc/cron.d/maincron
|
||||
RUN touch /var/log/cron.log
|
||||
|
||||
|
||||
|
||||
RUN mkdir -p /var/log/cron
|
||||
RUN touch /var/log/cron/cron.log
|
||||
|
||||
|
||||
Reference in New Issue
Block a user