Docker: increase maximum file upload size to 10 MiB

Relates to https://github.com/shaarli/Shaarli/issues/681

Changed:
- nginx+php-fpm: set maximum upload size to 10 MiB

See:
- https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size
- https://secure.php.net/manual/en/ini.core.php#ini.post-max-size
- https://secure.php.net/manual/en/ini.core.php#ini.upload-max-filesize

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
This commit is contained in:
VirtualTam 2016-11-05 20:42:54 +01:00
parent b7f8b874bb
commit 68579ad5c4
7 changed files with 14 additions and 0 deletions

View file

@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- archives contain a `Shaarli` directory, itself containing sources + dependencies - archives contain a `Shaarli` directory, itself containing sources + dependencies
- the tarball is now gzipped - the tarball is now gzipped
- Minor code cleanup: PHPDoc, spelling, unused variables, etc. - Minor code cleanup: PHPDoc, spelling, unused variables, etc.
- Docker: explicitly set the maximum file upload size to 10 MiB
### Fixed ### Fixed
- Fix the server `<self>` value in Atom/RSS feeds - Fix the server `<self>` value in Atom/RSS feeds
@ -27,6 +28,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Tools: only display parameter description when it exists - Tools: only display parameter description when it exists
- archive.org: do not propose archival of private notes - archive.org: do not propose archival of private notes
- Use absolute URL for hashtags in RSS and ATOM feeds - Use absolute URL for hashtags in RSS and ATOM feeds
- Docker: specify the location of the favicon
### Security ### Security
- Allow whitelisting trusted IPs, else continue banning clients upon login failure - Allow whitelisting trusted IPs, else continue banning clients upon login failure

View file

@ -15,6 +15,8 @@ RUN apt-get update \
nano \ nano \
&& apt-get clean && apt-get clean
RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini
RUN sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini
COPY nginx.conf /etc/nginx/nginx.conf COPY nginx.conf /etc/nginx/nginx.conf
COPY supervised.conf /etc/supervisor/conf.d/supervised.conf COPY supervised.conf /etc/supervisor/conf.d/supervised.conf

View file

@ -11,6 +11,8 @@ http {
default_type application/octet-stream; default_type application/octet-stream;
keepalive_timeout 20; keepalive_timeout 20;
client_max_body_size 10m;
index index.html index.php; index index.html index.php;
server { server {

View file

@ -14,6 +14,8 @@ RUN apt-get update \
supervisor \ supervisor \
&& apt-get clean && apt-get clean
RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini
RUN sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini
COPY nginx.conf /etc/nginx/nginx.conf COPY nginx.conf /etc/nginx/nginx.conf
COPY supervised.conf /etc/supervisor/conf.d/supervised.conf COPY supervised.conf /etc/supervisor/conf.d/supervised.conf

View file

@ -11,6 +11,8 @@ http {
default_type application/octet-stream; default_type application/octet-stream;
keepalive_timeout 20; keepalive_timeout 20;
client_max_body_size 10m;
index index.html index.php; index index.html index.php;
server { server {

View file

@ -14,6 +14,8 @@ RUN apt-get update \
supervisor \ supervisor \
&& apt-get clean && apt-get clean
RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini
RUN sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini
COPY nginx.conf /etc/nginx/nginx.conf COPY nginx.conf /etc/nginx/nginx.conf
COPY supervised.conf /etc/supervisor/conf.d/supervised.conf COPY supervised.conf /etc/supervisor/conf.d/supervised.conf

View file

@ -11,6 +11,8 @@ http {
default_type application/octet-stream; default_type application/octet-stream;
keepalive_timeout 20; keepalive_timeout 20;
client_max_body_size 10m;
index index.html index.php; index index.html index.php;
server { server {