]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Merge pull request #684 from virtualtam/fix/docker/nginx
authorArthur <arthur@hoa.ro>
Tue, 8 Nov 2016 11:06:00 +0000 (12:06 +0100)
committerGitHub <noreply@github.com>
Tue, 8 Nov 2016 11:06:00 +0000 (12:06 +0100)
Docker: fix & improve nginx+php-fpm configuration

CHANGELOG.md
docker/development/Dockerfile
docker/development/nginx.conf
docker/production/Dockerfile
docker/production/nginx.conf
docker/production/stable/Dockerfile
docker/production/stable/nginx.conf

index d42d6a75e2fa42c02d9be9e27b763079a8795a94..5eeb521af36466c06b60c67d6b9cccd074540f36 100644 (file)
@@ -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 `<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
     - 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
index 0c19b0855d0b9d282e04e906cce7d254bab2af3f..d9ef8da7db2eada974c7d6ce6cd6f684583755f6 100644 (file)
@@ -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
 
index cda09b565028b0ad39400b3d715d03789e989250..ac0c6c61ce165976b7572bb96eb8ba90b5f4d2a8 100644 (file)
@@ -11,6 +11,8 @@ http {
     default_type       application/octet-stream;
     keepalive_timeout  20;
 
+    client_max_body_size 10m;
+
     index index.html index.php;
 
     server {
@@ -49,6 +51,11 @@ http {
             add_header Cache-Control "public, must-revalidate, proxy-revalidate";
         }
 
+        location = /favicon.ico {
+            # serve the Shaarli favicon from its custom location
+            alias /var/www/shaarli/images/favicon.ico;
+        }
+
         location ~ (index)\.php$ {
             # filter and proxy PHP requests to PHP-FPM
             fastcgi_pass   unix:/var/run/php5-fpm.sock;
index d93ed262b79acd97ce114256aa940a927bf794a4..d0509115c5907e158c52292919b7a87506ae070e 100644 (file)
@@ -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
 
index e23c4587da122c790f26c6893838280c39b03908..5ffa02d0a9d570136d4ab7ea8f8bef4107f03cb7 100644 (file)
@@ -11,6 +11,8 @@ http {
     default_type       application/octet-stream;
     keepalive_timeout  20;
 
+    client_max_body_size 10m;
+
     index index.html index.php;
 
     server {
@@ -41,6 +43,11 @@ http {
             add_header Cache-Control "public, must-revalidate, proxy-revalidate";
         }
 
+        location = /favicon.ico {
+            # serve the Shaarli favicon from its custom location
+            alias /var/www/shaarli/images/favicon.ico;
+        }
+
         location ~ (index)\.php$ {
             # filter and proxy PHP requests to PHP-FPM
             fastcgi_pass   unix:/var/run/php5-fpm.sock;
index a509fda65cfc00fee884127fda3e2433f6adfe9b..fc9588b0d604dd4023a232ef17c4a8d76f26d98b 100644 (file)
@@ -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
 
index e23c4587da122c790f26c6893838280c39b03908..5ffa02d0a9d570136d4ab7ea8f8bef4107f03cb7 100644 (file)
@@ -11,6 +11,8 @@ http {
     default_type       application/octet-stream;
     keepalive_timeout  20;
 
+    client_max_body_size 10m;
+
     index index.html index.php;
 
     server {
@@ -41,6 +43,11 @@ http {
             add_header Cache-Control "public, must-revalidate, proxy-revalidate";
         }
 
+        location = /favicon.ico {
+            # serve the Shaarli favicon from its custom location
+            alias /var/www/shaarli/images/favicon.ico;
+        }
+
         location ~ (index)\.php$ {
             # filter and proxy PHP requests to PHP-FPM
             fastcgi_pass   unix:/var/run/php5-fpm.sock;