From 91a538cef7509ef8cfb685e9a49c5b0c993dc31f Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Fri, 5 Jun 2026 10:14:49 -0500 Subject: [PATCH] up --- Dockerfile | 1 + docker/supervisord.conf | 20 +++++++++++++++----- docker/www.conf | 18 ++++++++++++++++++ 3 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 docker/www.conf diff --git a/Dockerfile b/Dockerfile index 54c548b..255c010 100644 --- a/Dockerfile +++ b/Dockerfile @@ -65,6 +65,7 @@ RUN mkdir -p bootstrap/cache storage/framework/views storage/framework/cache sto COPY docker/nginx.conf /etc/nginx/http.d/default.conf COPY docker/supervisord.conf /etc/supervisor.conf +COPY docker/www.conf /usr/local/etc/php-fpm.d/www.conf RUN echo "* * * * * php /app/artisan schedule:run >> /dev/null 2>&1" > /etc/crontabs/www-data diff --git a/docker/supervisord.conf b/docker/supervisord.conf index 2f82dcf..13c99f1 100644 --- a/docker/supervisord.conf +++ b/docker/supervisord.conf @@ -4,19 +4,25 @@ pidfile=/tmp/supervisord.pid logfile=/dev/stdout logfile_maxbytes=0 -[program:nginx] -command=nginx -g "daemon off;" +[program:php-fpm] +command=php-fpm -F autostart=true autorestart=true +startsecs=5 +startretries=3 +priority=1 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 -[program:php-fpm] -command=php-fpm +[program:nginx] +command=nginx -g "daemon off;" autostart=true autorestart=true +startsecs=5 +startretries=3 +priority=2 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr @@ -29,6 +35,8 @@ autostart=true autorestart=true stopasgroup=true killasgroup=true +startsecs=10 +priority=3 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr @@ -36,9 +44,11 @@ stderr_logfile_maxbytes=0 numprocs=1 [program:cron] -command=crond -f +command=crond -f -l 2 autostart=true autorestart=true +startsecs=5 +priority=4 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr diff --git a/docker/www.conf b/docker/www.conf new file mode 100644 index 0000000..1d96636 --- /dev/null +++ b/docker/www.conf @@ -0,0 +1,18 @@ +[www] +user = www-data +group = www-data +listen = 127.0.0.1:9000 +listen.owner = www-data +listen.group = www-data +listen.mode = 0660 +pm = dynamic +pm.max_children = 10 +pm.start_servers = 2 +pm.min_spare_servers = 1 +pm.max_spare_servers = 3 +pm.max_requests = 500 +clear_env = no +catch_workers_output = yes +php_admin_flag[display_errors] = off +php_admin_flag[log_errors] = on +php_admin_value[error_log] = /proc/self/fd/2