diff --git a/Dockerfile b/Dockerfile index 28695f0..300a75a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,9 +2,7 @@ FROM php:8.3-fpm # ---- system & PHP extensions ------------------------------------------------- RUN apt-get update && apt-get install -y --no-install-recommends \ - nginx \ - gettext \ - logrotate \ + procps nginx gettext logrotate \ git unzip zip curl ca-certificates supervisor cron nano \ libpng-dev libjpeg62-turbo-dev libfreetype6-dev \ libonig-dev libxml2-dev libzip-dev libpq-dev libicu-dev libxslt-dev \ diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 2b3bb19..dcfe9fd 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -43,8 +43,9 @@ php-fpm -D envsubst '${NGINX_HOST} ${NGINX_PORT}' < /etc/nginx/templates/default.conf.template > /etc/nginx/conf.d/default.conf exec nginx -g "daemon off;" +chmod -R go-w /etc/logrotate.d/app echo "0 0 * * * root /usr/sbin/logrotate /etc/logrotate.d/app" > /etc/cron.d/logrotate-Laravel chmod 0644 /etc/cron.d/logrotate-Laravel -crontab /etc/cron.d/logrotate-Laravel + echo "[entrypoint] Testing logrotate config..." logrotate --debug /etc/logrotate.d/app/laravel.conf \ No newline at end of file