From 68579ad5c4d1978366c5d2be2ef34da6a3618ef0 Mon Sep 17 00:00:00 2001 From: VirtualTam Date: Sat, 5 Nov 2016 20:42:54 +0100 Subject: 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 --- CHANGELOG.md | 2 ++ docker/development/Dockerfile | 2 ++ docker/development/nginx.conf | 2 ++ docker/production/Dockerfile | 2 ++ docker/production/nginx.conf | 2 ++ docker/production/stable/Dockerfile | 2 ++ docker/production/stable/nginx.conf | 2 ++ 7 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d42d6a75..5eeb521a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - archives contain a `Shaarli` directory, itself containing sources + dependencies - the tarball is now gzipped - Minor code cleanup: PHPDoc, spelling, unused variables, etc. +- Docker: explicitly set the maximum file upload size to 10 MiB ### Fixed - Fix the server `` 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 - archive.org: do not propose archival of private notes - Use absolute URL for hashtags in RSS and ATOM feeds +- Docker: specify the location of the favicon ### Security - Allow whitelisting trusted IPs, else continue banning clients upon login failure diff --git a/docker/development/Dockerfile b/docker/development/Dockerfile index 0c19b085..d9ef8da7 100644 --- a/docker/development/Dockerfile +++ b/docker/development/Dockerfile @@ -15,6 +15,8 @@ RUN apt-get update \ nano \ && 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 supervised.conf /etc/supervisor/conf.d/supervised.conf diff --git a/docker/development/nginx.conf b/docker/development/nginx.conf index e714ee76..ac0c6c61 100644 --- a/docker/development/nginx.conf +++ b/docker/development/nginx.conf @@ -11,6 +11,8 @@ http { default_type application/octet-stream; keepalive_timeout 20; + client_max_body_size 10m; + index index.html index.php; server { diff --git a/docker/production/Dockerfile b/docker/production/Dockerfile index d93ed262..d0509115 100644 --- a/docker/production/Dockerfile +++ b/docker/production/Dockerfile @@ -14,6 +14,8 @@ RUN apt-get update \ supervisor \ && 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 supervised.conf /etc/supervisor/conf.d/supervised.conf diff --git a/docker/production/nginx.conf b/docker/production/nginx.conf index f7d59fc8..5ffa02d0 100644 --- a/docker/production/nginx.conf +++ b/docker/production/nginx.conf @@ -11,6 +11,8 @@ http { default_type application/octet-stream; keepalive_timeout 20; + client_max_body_size 10m; + index index.html index.php; server { diff --git a/docker/production/stable/Dockerfile b/docker/production/stable/Dockerfile index a509fda6..fc9588b0 100644 --- a/docker/production/stable/Dockerfile +++ b/docker/production/stable/Dockerfile @@ -14,6 +14,8 @@ RUN apt-get update \ supervisor \ && 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 supervised.conf /etc/supervisor/conf.d/supervised.conf diff --git a/docker/production/stable/nginx.conf b/docker/production/stable/nginx.conf index f7d59fc8..5ffa02d0 100644 --- a/docker/production/stable/nginx.conf +++ b/docker/production/stable/nginx.conf @@ -11,6 +11,8 @@ http { default_type application/octet-stream; keepalive_timeout 20; + client_max_body_size 10m; + index index.html index.php; server { -- cgit v1.2.3