diff options
-rw-r--r-- | .docker/.htaccess (renamed from docker/.htaccess) | 0 | ||||
-rw-r--r-- | .docker/nginx.conf (renamed from docker/development/nginx.conf) | 17 | ||||
-rw-r--r-- | .docker/supervised.conf (renamed from docker/development/supervised.conf) | 0 | ||||
-rw-r--r-- | .dockerignore | 34 | ||||
-rw-r--r-- | .gitattributes | 4 | ||||
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | CHANGELOG.md | 8 | ||||
-rw-r--r-- | Dockerfile | 50 | ||||
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | docker/development/Dockerfile | 38 | ||||
-rw-r--r-- | docker/development/IMAGE.md | 10 | ||||
-rw-r--r-- | docker/production/Dockerfile | 37 | ||||
-rw-r--r-- | docker/production/IMAGE.md | 5 | ||||
-rw-r--r-- | docker/production/nginx.conf | 63 | ||||
-rw-r--r-- | docker/production/stable/Dockerfile | 37 | ||||
-rw-r--r-- | docker/production/stable/IMAGE.md | 5 | ||||
-rw-r--r-- | docker/production/stable/nginx.conf | 63 | ||||
-rw-r--r-- | docker/production/stable/supervised.conf | 13 | ||||
-rw-r--r-- | docker/production/supervised.conf | 13 |
19 files changed, 112 insertions, 298 deletions
diff --git a/docker/.htaccess b/.docker/.htaccess index f601c1ee..f601c1ee 100644 --- a/docker/.htaccess +++ b/.docker/.htaccess | |||
diff --git a/docker/development/nginx.conf b/.docker/nginx.conf index ac0c6c61..e8754d9b 100644 --- a/docker/development/nginx.conf +++ b/.docker/nginx.conf | |||
@@ -22,14 +22,6 @@ http { | |||
22 | access_log /var/log/nginx/shaarli.access.log; | 22 | access_log /var/log/nginx/shaarli.access.log; |
23 | error_log /var/log/nginx/shaarli.error.log; | 23 | error_log /var/log/nginx/shaarli.error.log; |
24 | 24 | ||
25 | location /phpinfo/ { | ||
26 | # add a PHP info page for convenience | ||
27 | fastcgi_pass unix:/var/run/php5-fpm.sock; | ||
28 | fastcgi_index index.php; | ||
29 | fastcgi_param SCRIPT_FILENAME /var/www/index.php; | ||
30 | include fastcgi_params; | ||
31 | } | ||
32 | |||
33 | location ~ /\. { | 25 | location ~ /\. { |
34 | # deny access to dotfiles | 26 | # deny access to dotfiles |
35 | access_log off; | 27 | access_log off; |
@@ -56,7 +48,16 @@ http { | |||
56 | alias /var/www/shaarli/images/favicon.ico; | 48 | alias /var/www/shaarli/images/favicon.ico; |
57 | } | 49 | } |
58 | 50 | ||
51 | location / { | ||
52 | # Slim - rewrite URLs | ||
53 | try_files $uri /index.php$is_args$args; | ||
54 | } | ||
55 | |||
59 | location ~ (index)\.php$ { | 56 | location ~ (index)\.php$ { |
57 | # Slim - split URL path into (script_filename, path_info) | ||
58 | try_files $uri =404; | ||
59 | fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||
60 | |||
60 | # filter and proxy PHP requests to PHP-FPM | 61 | # filter and proxy PHP requests to PHP-FPM |
61 | fastcgi_pass unix:/var/run/php5-fpm.sock; | 62 | fastcgi_pass unix:/var/run/php5-fpm.sock; |
62 | fastcgi_index index.php; | 63 | fastcgi_index index.php; |
diff --git a/docker/development/supervised.conf b/.docker/supervised.conf index 5acd9795..5acd9795 100644 --- a/docker/development/supervised.conf +++ b/.docker/supervised.conf | |||
diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..9a18e085 --- /dev/null +++ b/.dockerignore | |||
@@ -0,0 +1,34 @@ | |||
1 | # Docker-ignore | ||
2 | # Note: .git/ is kept for HTML documentation generation | ||
3 | tests | ||
4 | |||
5 | # Shaarli runtime resources | ||
6 | cache/* | ||
7 | data/* | ||
8 | pagecache/* | ||
9 | tmp/* | ||
10 | |||
11 | # Eclipse project files | ||
12 | .settings | ||
13 | .buildpath | ||
14 | .project | ||
15 | |||
16 | # Raintpl generated pages | ||
17 | *.rtpl.php | ||
18 | |||
19 | # 3rd-party dependencies | ||
20 | composer.lock | ||
21 | vendor/ | ||
22 | |||
23 | # Release archives | ||
24 | *.tar | ||
25 | *.zip | ||
26 | |||
27 | # Development and test resources | ||
28 | coverage | ||
29 | doxygen | ||
30 | sandbox | ||
31 | phpmd.html | ||
32 | |||
33 | # User plugin configuration | ||
34 | plugins/*/config.php | ||
diff --git a/.gitattributes b/.gitattributes index d753b1db..a3a22a15 100644 --- a/.gitattributes +++ b/.gitattributes | |||
@@ -23,7 +23,9 @@ Dockerfile text | |||
23 | .travis.yml export-ignore | 23 | .travis.yml export-ignore |
24 | doc/**/*.json export-ignore | 24 | doc/**/*.json export-ignore |
25 | doc/**/*.md export-ignore | 25 | doc/**/*.md export-ignore |
26 | docker/ export-ignore | 26 | .docker/ export-ignore |
27 | .dockerignore export-ignore | ||
28 | Dockerfile export-ignore | ||
27 | Doxyfile export-ignore | 29 | Doxyfile export-ignore |
28 | Makefile export-ignore | 30 | Makefile export-ignore |
29 | phpunit.xml export-ignore | 31 | phpunit.xml export-ignore |
diff --git a/.travis.yml b/.travis.yml index 6ff1b20f..e59c8f6a 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -9,7 +9,7 @@ php: | |||
9 | - 5.6 | 9 | - 5.6 |
10 | - 5.5 | 10 | - 5.5 |
11 | - 5.4 | 11 | - 5.4 |
12 | - 5.3 | 12 | # - 5.3 # Not supported by Travis CI |
13 | install: | 13 | install: |
14 | - composer self-update | 14 | - composer self-update |
15 | - composer install --prefer-dist | 15 | - composer install --prefer-dist |
diff --git a/CHANGELOG.md b/CHANGELOG.md index 84dc18cc..3f5bafd1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md | |||
@@ -4,9 +4,15 @@ All notable changes to this project will be documented in this file. | |||
4 | The format is based on [Keep a Changelog](http://keepachangelog.com/) | 4 | The format is based on [Keep a Changelog](http://keepachangelog.com/) |
5 | and this project adheres to [Semantic Versioning](http://semver.org/). | 5 | and this project adheres to [Semantic Versioning](http://semver.org/). |
6 | 6 | ||
7 | ## [v0.8.7](https://github.com/shaarli/Shaarli/releases/tag/v0.8.7) - UNPUBLISHED | ||
8 | ### Changed | ||
9 | - Build the Docker image from the local Git sources | ||
10 | |||
11 | ### Removed | ||
12 | - Disable PHP 5.3 Travis build (unsupported) | ||
7 | 13 | ||
8 | ## [v0.8.6](https://github.com/shaarli/Shaarli/releases/tag/v0.8.5) - 2018-02-19 | ||
9 | 14 | ||
15 | ## [v0.8.6](https://github.com/shaarli/Shaarli/releases/tag/v0.8.6) - 2018-02-19 | ||
10 | ### Changed | 16 | ### Changed |
11 | - Run version check tests against the 'stable' branch | 17 | - Run version check tests against the 'stable' branch |
12 | 18 | ||
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..e8067031 --- /dev/null +++ b/Dockerfile | |||
@@ -0,0 +1,50 @@ | |||
1 | # Stage 1: | ||
2 | # - Get Shaarli sources | ||
3 | # - Build documentation | ||
4 | FROM dalibo/pandocker:stable as docs | ||
5 | ADD . /pandoc/shaarli | ||
6 | RUN cd /pandoc/shaarli \ | ||
7 | && make htmldoc \ | ||
8 | && rm -rf .git | ||
9 | |||
10 | # Stage 2: | ||
11 | # - Resolve PHP dependencies with Composer | ||
12 | FROM composer:latest as composer | ||
13 | COPY --from=docs /pandoc/shaarli /app/shaarli | ||
14 | RUN cd shaarli \ | ||
15 | && composer --prefer-dist --no-dev install | ||
16 | |||
17 | # Stage 3: | ||
18 | # - Shaarli image | ||
19 | FROM debian:jessie | ||
20 | LABEL maintainer="Shaarli Community" | ||
21 | |||
22 | ENV TERM dumb | ||
23 | RUN apt-get update \ | ||
24 | && apt-get install --no-install-recommends -y \ | ||
25 | ca-certificates \ | ||
26 | curl \ | ||
27 | nginx-light \ | ||
28 | php5-curl \ | ||
29 | php5-fpm \ | ||
30 | php5-gd \ | ||
31 | php5-intl \ | ||
32 | supervisor \ | ||
33 | && apt-get clean | ||
34 | |||
35 | RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini \ | ||
36 | && sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini | ||
37 | |||
38 | COPY .docker/nginx.conf /etc/nginx/nginx.conf | ||
39 | COPY .docker/supervised.conf /etc/supervisor/conf.d/supervised.conf | ||
40 | |||
41 | WORKDIR /var/www | ||
42 | COPY --from=composer /app/shaarli shaarli | ||
43 | RUN rm -rf html \ | ||
44 | && chown -R www-data:www-data . | ||
45 | |||
46 | VOLUME /var/www/shaarli/data | ||
47 | |||
48 | EXPOSE 80 | ||
49 | |||
50 | CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"] | ||
@@ -11,6 +11,7 @@ | |||
11 | # - install Xdebug for PHPUnit code coverage reports: | 11 | # - install Xdebug for PHPUnit code coverage reports: |
12 | # - see http://xdebug.org/docs/install | 12 | # - see http://xdebug.org/docs/install |
13 | # - enable in php.ini | 13 | # - enable in php.ini |
14 | SHELL := /bin/bash | ||
14 | 15 | ||
15 | BIN = vendor/bin | 16 | BIN = vendor/bin |
16 | PHP_SOURCE = index.php application tests plugins | 17 | PHP_SOURCE = index.php application tests plugins |
@@ -203,14 +204,18 @@ htmlsidebar: | |||
203 | htmlpages: | 204 | htmlpages: |
204 | @for file in `find doc/ -maxdepth 1 -name "*.md"`; do \ | 205 | @for file in `find doc/ -maxdepth 1 -name "*.md"`; do \ |
205 | base=`basename $$file .md`; \ | 206 | base=`basename $$file .md`; \ |
206 | sed -i "1i #$${base//-/ }" $$file; \ | 207 | sed -i "1i # $${base//-/ }" $$file; \ |
207 | awk 'BEGIN { FS = "[\\[\\]]{2}" }'\ | 208 | awk 'BEGIN { FS = "[\\[\\]]{2}" }'\ |
208 | 'm = /\[/ { t=$$2; gsub(/ /, "-", $$2); print $$1"["t"]("$$2".html)"$$3 }'\ | 209 | 'm = /\[/ { t=$$2; gsub(/ /, "-", $$2); print $$1"["t"]("$$2".html)"$$3 }'\ |
209 | '!m { print $$0 }' $$file > doc/tmp.md; \ | 210 | '!m { print $$0 }' $$file > doc/tmp.md; \ |
210 | mv doc/tmp.md $$file; \ | 211 | mv doc/tmp.md $$file; \ |
211 | pandoc -f markdown_github -t html5 -s \ | 212 | pandoc -f gfm \ |
213 | -t html5 \ | ||
214 | -s \ | ||
212 | -c "github-markdown.css" \ | 215 | -c "github-markdown.css" \ |
213 | -T Shaarli -M pagetitle:"$${base//-/ }" -B doc/sidebar.html \ | 216 | -T Shaarli \ |
217 | -M pagetitle:"$${base//-/ }" \ | ||
218 | -B doc/sidebar.html \ | ||
214 | -o doc/$$base.html $$file; \ | 219 | -o doc/$$base.html $$file; \ |
215 | done; | 220 | done; |
216 | 221 | ||
diff --git a/docker/development/Dockerfile b/docker/development/Dockerfile deleted file mode 100644 index d9ef8da7..00000000 --- a/docker/development/Dockerfile +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | FROM debian:jessie | ||
2 | MAINTAINER Shaarli Community | ||
3 | |||
4 | ENV TERM dumb | ||
5 | RUN apt-get update \ | ||
6 | && apt-get install --no-install-recommends -y \ | ||
7 | ca-certificates \ | ||
8 | nginx-light \ | ||
9 | php5-curl \ | ||
10 | php5-fpm \ | ||
11 | php5-gd \ | ||
12 | php5-intl \ | ||
13 | supervisor \ | ||
14 | git \ | ||
15 | nano \ | ||
16 | && apt-get clean | ||
17 | |||
18 | RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini | ||
19 | RUN sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini | ||
20 | COPY nginx.conf /etc/nginx/nginx.conf | ||
21 | COPY supervised.conf /etc/supervisor/conf.d/supervised.conf | ||
22 | |||
23 | ADD https://getcomposer.org/composer.phar /usr/local/bin/composer | ||
24 | RUN chmod 755 /usr/local/bin/composer | ||
25 | |||
26 | WORKDIR /var/www | ||
27 | RUN git clone https://github.com/shaarli/Shaarli.git shaarli \ | ||
28 | && cd shaarli \ | ||
29 | && composer --prefer-dist install | ||
30 | RUN rm -rf html \ | ||
31 | && echo "<?php phpinfo(); ?>" > index.php \ | ||
32 | && chown -R www-data:www-data . | ||
33 | |||
34 | VOLUME /var/www/shaarli/data | ||
35 | |||
36 | EXPOSE 80 | ||
37 | |||
38 | CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"] | ||
diff --git a/docker/development/IMAGE.md b/docker/development/IMAGE.md deleted file mode 100644 index e2ff0f0e..00000000 --- a/docker/development/IMAGE.md +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | ## shaarli:dev | ||
2 | - [Debian 8 Jessie](https://hub.docker.com/_/debian/) | ||
3 | - [PHP5-FPM](http://php-fpm.org/) | ||
4 | - [Nginx](http://nginx.org/) | ||
5 | - [Shaarli](https://github.com/shaarli/Shaarli) | ||
6 | |||
7 | ### Development tools | ||
8 | - [composer](https://getcomposer.org/) | ||
9 | - [git](http://git-scm.com/) | ||
10 | - [nano](http://www.nano-editor.org/) | ||
diff --git a/docker/production/Dockerfile b/docker/production/Dockerfile deleted file mode 100644 index d0509115..00000000 --- a/docker/production/Dockerfile +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | FROM debian:jessie | ||
2 | MAINTAINER Shaarli Community | ||
3 | |||
4 | ENV TERM dumb | ||
5 | RUN apt-get update \ | ||
6 | && apt-get install --no-install-recommends -y \ | ||
7 | ca-certificates \ | ||
8 | curl \ | ||
9 | nginx-light \ | ||
10 | php5-curl \ | ||
11 | php5-fpm \ | ||
12 | php5-gd \ | ||
13 | php5-intl \ | ||
14 | supervisor \ | ||
15 | && apt-get clean | ||
16 | |||
17 | RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini | ||
18 | RUN sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini | ||
19 | COPY nginx.conf /etc/nginx/nginx.conf | ||
20 | COPY supervised.conf /etc/supervisor/conf.d/supervised.conf | ||
21 | |||
22 | ADD https://getcomposer.org/composer.phar /usr/local/bin/composer | ||
23 | RUN chmod 755 /usr/local/bin/composer | ||
24 | |||
25 | WORKDIR /var/www | ||
26 | RUN curl -L https://github.com/shaarli/Shaarli/archive/master.tar.gz | tar xzf - \ | ||
27 | && mv Shaarli-master shaarli \ | ||
28 | && cd shaarli \ | ||
29 | && composer --prefer-dist --no-dev install | ||
30 | RUN rm -rf html \ | ||
31 | && chown -R www-data:www-data . | ||
32 | |||
33 | VOLUME /var/www/shaarli/data | ||
34 | |||
35 | EXPOSE 80 | ||
36 | |||
37 | CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"] | ||
diff --git a/docker/production/IMAGE.md b/docker/production/IMAGE.md deleted file mode 100644 index 6f827b35..00000000 --- a/docker/production/IMAGE.md +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | ## shaarli:latest | ||
2 | - [Debian 8 Jessie](https://hub.docker.com/_/debian/) | ||
3 | - [PHP5-FPM](http://php-fpm.org/) | ||
4 | - [Nginx](http://nginx.org/) | ||
5 | - [Shaarli](https://github.com/shaarli/Shaarli) | ||
diff --git a/docker/production/nginx.conf b/docker/production/nginx.conf deleted file mode 100644 index 5ffa02d0..00000000 --- a/docker/production/nginx.conf +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | user www-data www-data; | ||
2 | daemon off; | ||
3 | worker_processes 4; | ||
4 | |||
5 | events { | ||
6 | worker_connections 768; | ||
7 | } | ||
8 | |||
9 | http { | ||
10 | include mime.types; | ||
11 | default_type application/octet-stream; | ||
12 | keepalive_timeout 20; | ||
13 | |||
14 | client_max_body_size 10m; | ||
15 | |||
16 | index index.html index.php; | ||
17 | |||
18 | server { | ||
19 | listen 80; | ||
20 | root /var/www/shaarli; | ||
21 | |||
22 | access_log /var/log/nginx/shaarli.access.log; | ||
23 | error_log /var/log/nginx/shaarli.error.log; | ||
24 | |||
25 | location ~ /\. { | ||
26 | # deny access to dotfiles | ||
27 | access_log off; | ||
28 | log_not_found off; | ||
29 | deny all; | ||
30 | } | ||
31 | |||
32 | location ~ ~$ { | ||
33 | # deny access to temp editor files, e.g. "script.php~" | ||
34 | access_log off; | ||
35 | log_not_found off; | ||
36 | deny all; | ||
37 | } | ||
38 | |||
39 | location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { | ||
40 | # cache static assets | ||
41 | expires max; | ||
42 | add_header Pragma public; | ||
43 | add_header Cache-Control "public, must-revalidate, proxy-revalidate"; | ||
44 | } | ||
45 | |||
46 | location = /favicon.ico { | ||
47 | # serve the Shaarli favicon from its custom location | ||
48 | alias /var/www/shaarli/images/favicon.ico; | ||
49 | } | ||
50 | |||
51 | location ~ (index)\.php$ { | ||
52 | # filter and proxy PHP requests to PHP-FPM | ||
53 | fastcgi_pass unix:/var/run/php5-fpm.sock; | ||
54 | fastcgi_index index.php; | ||
55 | include fastcgi.conf; | ||
56 | } | ||
57 | |||
58 | location ~ \.php$ { | ||
59 | # deny access to all other PHP scripts | ||
60 | deny all; | ||
61 | } | ||
62 | } | ||
63 | } | ||
diff --git a/docker/production/stable/Dockerfile b/docker/production/stable/Dockerfile deleted file mode 100644 index fc9588b0..00000000 --- a/docker/production/stable/Dockerfile +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | FROM debian:jessie | ||
2 | MAINTAINER Shaarli Community | ||
3 | |||
4 | ENV TERM dumb | ||
5 | RUN apt-get update \ | ||
6 | && apt-get install --no-install-recommends -y \ | ||
7 | ca-certificates \ | ||
8 | curl \ | ||
9 | nginx-light \ | ||
10 | php5-curl \ | ||
11 | php5-fpm \ | ||
12 | php5-gd \ | ||
13 | php5-intl \ | ||
14 | supervisor \ | ||
15 | && apt-get clean | ||
16 | |||
17 | RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini | ||
18 | RUN sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini | ||
19 | COPY nginx.conf /etc/nginx/nginx.conf | ||
20 | COPY supervised.conf /etc/supervisor/conf.d/supervised.conf | ||
21 | |||
22 | ADD https://getcomposer.org/composer.phar /usr/local/bin/composer | ||
23 | RUN chmod 755 /usr/local/bin/composer | ||
24 | |||
25 | WORKDIR /var/www | ||
26 | RUN curl -L https://github.com/shaarli/Shaarli/archive/stable.tar.gz | tar xzf - \ | ||
27 | && mv Shaarli-stable shaarli \ | ||
28 | && cd shaarli \ | ||
29 | && composer --prefer-dist --no-dev install | ||
30 | RUN rm -rf html \ | ||
31 | && chown -R www-data:www-data . | ||
32 | |||
33 | VOLUME /var/www/shaarli/data | ||
34 | |||
35 | EXPOSE 80 | ||
36 | |||
37 | CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"] | ||
diff --git a/docker/production/stable/IMAGE.md b/docker/production/stable/IMAGE.md deleted file mode 100644 index d85b1d7a..00000000 --- a/docker/production/stable/IMAGE.md +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | ## shaarli:stable | ||
2 | - [Debian 8 Jessie](https://hub.docker.com/_/debian/) | ||
3 | - [PHP5-FPM](http://php-fpm.org/) | ||
4 | - [Nginx](http://nginx.org/) | ||
5 | - [Shaarli (stable)](https://github.com/shaarli/Shaarli/tree/stable) | ||
diff --git a/docker/production/stable/nginx.conf b/docker/production/stable/nginx.conf deleted file mode 100644 index 5ffa02d0..00000000 --- a/docker/production/stable/nginx.conf +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | user www-data www-data; | ||
2 | daemon off; | ||
3 | worker_processes 4; | ||
4 | |||
5 | events { | ||
6 | worker_connections 768; | ||
7 | } | ||
8 | |||
9 | http { | ||
10 | include mime.types; | ||
11 | default_type application/octet-stream; | ||
12 | keepalive_timeout 20; | ||
13 | |||
14 | client_max_body_size 10m; | ||
15 | |||
16 | index index.html index.php; | ||
17 | |||
18 | server { | ||
19 | listen 80; | ||
20 | root /var/www/shaarli; | ||
21 | |||
22 | access_log /var/log/nginx/shaarli.access.log; | ||
23 | error_log /var/log/nginx/shaarli.error.log; | ||
24 | |||
25 | location ~ /\. { | ||
26 | # deny access to dotfiles | ||
27 | access_log off; | ||
28 | log_not_found off; | ||
29 | deny all; | ||
30 | } | ||
31 | |||
32 | location ~ ~$ { | ||
33 | # deny access to temp editor files, e.g. "script.php~" | ||
34 | access_log off; | ||
35 | log_not_found off; | ||
36 | deny all; | ||
37 | } | ||
38 | |||
39 | location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { | ||
40 | # cache static assets | ||
41 | expires max; | ||
42 | add_header Pragma public; | ||
43 | add_header Cache-Control "public, must-revalidate, proxy-revalidate"; | ||
44 | } | ||
45 | |||
46 | location = /favicon.ico { | ||
47 | # serve the Shaarli favicon from its custom location | ||
48 | alias /var/www/shaarli/images/favicon.ico; | ||
49 | } | ||
50 | |||
51 | location ~ (index)\.php$ { | ||
52 | # filter and proxy PHP requests to PHP-FPM | ||
53 | fastcgi_pass unix:/var/run/php5-fpm.sock; | ||
54 | fastcgi_index index.php; | ||
55 | include fastcgi.conf; | ||
56 | } | ||
57 | |||
58 | location ~ \.php$ { | ||
59 | # deny access to all other PHP scripts | ||
60 | deny all; | ||
61 | } | ||
62 | } | ||
63 | } | ||
diff --git a/docker/production/stable/supervised.conf b/docker/production/stable/supervised.conf deleted file mode 100644 index 5acd9795..00000000 --- a/docker/production/stable/supervised.conf +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | [program:php5-fpm] | ||
2 | command=/usr/sbin/php5-fpm -F | ||
3 | priority=5 | ||
4 | autostart=true | ||
5 | autorestart=true | ||
6 | |||
7 | [program:nginx] | ||
8 | command=/usr/sbin/nginx | ||
9 | priority=10 | ||
10 | autostart=true | ||
11 | autorestart=true | ||
12 | stdout_events_enabled=true | ||
13 | stderr_events_enabled=true | ||
diff --git a/docker/production/supervised.conf b/docker/production/supervised.conf deleted file mode 100644 index 5acd9795..00000000 --- a/docker/production/supervised.conf +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | [program:php5-fpm] | ||
2 | command=/usr/sbin/php5-fpm -F | ||
3 | priority=5 | ||
4 | autostart=true | ||
5 | autorestart=true | ||
6 | |||
7 | [program:nginx] | ||
8 | command=/usr/sbin/nginx | ||
9 | priority=10 | ||
10 | autostart=true | ||
11 | autorestart=true | ||
12 | stdout_events_enabled=true | ||
13 | stderr_events_enabled=true | ||