Modificación directa a php comandos para incremento de memoria de subida de archivos

This commit is contained in:
2026-05-11 02:33:52 -06:00
parent b76bff834b
commit 3fe47d5b1d
3 changed files with 22 additions and 13 deletions
+6 -1
View File
@@ -3,6 +3,11 @@ FROM php:8.2-fpm-alpine
RUN apk add --no-cache nginx nodejs npm supervisor \ RUN apk add --no-cache nginx nodejs npm supervisor \
&& docker-php-ext-install pdo pdo_mysql mysqli bcmath pcntl && 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 WORKDIR /app
COPY . . COPY . .
@@ -16,7 +21,7 @@ RUN npm ci && \
VITE_REVERB_APP_KEY=fmoknd2swp3clsqfbdpg \ VITE_REVERB_APP_KEY=fmoknd2swp3clsqfbdpg \
npm run build 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 && chmod -R 775 storage bootstrap/cache
RUN php artisan storage:link RUN php artisan storage:link
+14 -10
View File
@@ -1,28 +1,32 @@
worker_processes auto; worker_processes auto;
events { events {
worker_connections 1024; worker_connections 1024;
} }
http { http {
include /etc/nginx/mime.types; include /etc/nginx/mime.types;
default_type application/octet-stream; default_type application/octet-stream;
sendfile on; sendfile on;
keepalive_timeout 65; keepalive_timeout 65;
client_max_body_size 55M; client_max_body_size 55M;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
server { server {
listen 8080; listen 8080;
root /app/public;
index index.php;
location / { location / {
proxy_pass http://127.0.0.1:8081; try_files $uri $uri/ /index.php?$query_string;
proxy_set_header Host $host; }
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location ~ \.php$ {
proxy_set_header X-Forwarded-Proto $scheme; 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;
} }
} }
} }
+2 -2
View File
@@ -6,8 +6,8 @@ command=nginx -g "daemon off;"
autostart=true autostart=true
autorestart=true autorestart=true
[program:laravel] [program:php-fpm]
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 command=php-fpm -F
autostart=true autostart=true
autorestart=true autorestart=true