From 3fe47d5b1d68d664f76bfe007d92d89ebd6171a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20P=C3=A9rez?= Date: Mon, 11 May 2026 02:33:52 -0600 Subject: [PATCH] =?UTF-8?q?Modificaci=C3=B3n=20directa=20a=20php=20comando?= =?UTF-8?q?s=20para=20incremento=20de=20memoria=20de=20subida=20de=20archi?= =?UTF-8?q?vos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 7 ++++++- nginx.conf | 24 ++++++++++++++---------- supervisord.conf | 4 ++-- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0d4a4154..03f5e0a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,11 @@ FROM php:8.2-fpm-alpine RUN apk add --no-cache nginx nodejs npm supervisor \ && docker-php-ext-install pdo pdo_mysql mysqli bcmath pcntl +# Configurar PHP-FPM con lĂ­mites de upload +RUN echo "upload_max_filesize=50M" > /usr/local/etc/php/conf.d/uploads.ini \ + && echo "post_max_size=55M" >> /usr/local/etc/php/conf.d/uploads.ini \ + && echo "memory_limit=256M" >> /usr/local/etc/php/conf.d/uploads.ini + WORKDIR /app COPY . . @@ -16,7 +21,7 @@ RUN npm ci && \ VITE_REVERB_APP_KEY=fmoknd2swp3clsqfbdpg \ npm run build -RUN mkdir -p storage/framework/sessions storage/framework/views storage/framework/cache storage/app/livewire-tmp \ +RUN mkdir -p storage/framework/sessions storage/framework/views storage/framework/cache storage/app/livewire-tmp storage/logs \ && chmod -R 775 storage bootstrap/cache RUN php artisan storage:link diff --git a/nginx.conf b/nginx.conf index 7b41bfbe..18d9f23e 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,28 +1,32 @@ worker_processes auto; - events { worker_connections 1024; } - http { include /etc/nginx/mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; - client_max_body_size 55M; - proxy_read_timeout 120s; - proxy_send_timeout 120s; server { listen 8080; + root /app/public; + index index.php; location / { - proxy_pass http://127.0.0.1:8081; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; + try_files $uri $uri/ /index.php?$query_string; + } + + location ~ \.php$ { + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; + include fastcgi_params; + } + + location ~ /\.ht { + deny all; } } } diff --git a/supervisord.conf b/supervisord.conf index f8cdbb02..2e10a00a 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -6,8 +6,8 @@ command=nginx -g "daemon off;" autostart=true autorestart=true -[program:laravel] -command=php -d upload_max_filesize=50M -d post_max_size=55M -d memory_limit=256M /app/artisan serve --host=0.0.0.0 --port=8081 +[program:php-fpm] +command=php-fpm -F autostart=true autorestart=true