Force PHP upload limits via -d flags and fix Dockerfile layer order
Pass upload_max_filesize=50M and post_max_size=55M directly with -d flags on every php process in supervisord. This is guaranteed to apply regardless of ini scanning order or Docker layer caching. Also move COPY docker/php.ini before COPY . . so the conf.d file is always placed before the app code is copied, ensuring Docker does not use a stale cached layer that skips the ini file. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -3,6 +3,8 @@ 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
|
||||||
|
|
||||||
|
COPY docker/php.ini /usr/local/etc/php/conf.d/uploads.ini
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
@@ -17,8 +19,6 @@ RUN mkdir -p storage/framework/{sessions,views,cache} \
|
|||||||
|
|
||||||
RUN php artisan storage:link
|
RUN php artisan storage:link
|
||||||
|
|
||||||
COPY docker/php.ini /usr/local/etc/php/conf.d/uploads.ini
|
|
||||||
|
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
COPY supervisord.conf /etc/supervisord.conf
|
COPY supervisord.conf /etc/supervisord.conf
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -7,11 +7,11 @@ autostart=true
|
|||||||
autorestart=true
|
autorestart=true
|
||||||
|
|
||||||
[program:laravel]
|
[program:laravel]
|
||||||
command=php /app/artisan serve --host=127.0.0.1 --port=8081
|
command=php -d upload_max_filesize=50M -d post_max_size=55M -d memory_limit=256M /app/artisan serve --host=127.0.0.1 --port=8081
|
||||||
autostart=true
|
autostart=true
|
||||||
autorestart=true
|
autorestart=true
|
||||||
|
|
||||||
[program:reverb]
|
[program:reverb]
|
||||||
command=php /app/artisan reverb:start --host=0.0.0.0 --port=8085
|
command=php -d upload_max_filesize=50M -d post_max_size=55M -d memory_limit=256M /app/artisan reverb:start --host=0.0.0.0 --port=8085
|
||||||
autostart=true
|
autostart=true
|
||||||
autorestart=true
|
autorestart=true
|
||||||
|
|||||||
Reference in New Issue
Block a user