Modificación directa a php comandos para incremento de memoria de subida de archivos
This commit is contained in:
+6
-1
@@ -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
|
||||
|
||||
+14
-10
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user