diff options
author | ArthurHoaro <arthur@hoa.ro> | 2017-05-07 19:17:33 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2017-05-07 19:17:33 +0200 |
commit | 01e942d44c7194607649817216aeb5d65c6acad6 (patch) | |
tree | 15777aa1005251f119e6dd680291147117766b5b /docker | |
parent | bc22c9a0acb095970e9494cbe8954f0612e05dc0 (diff) | |
parent | 8868f3ca461011a8fb6dd9f90b60ed697ab52fc5 (diff) | |
download | Shaarli-01e942d44c7194607649817216aeb5d65c6acad6.tar.gz Shaarli-01e942d44c7194607649817216aeb5d65c6acad6.tar.zst Shaarli-01e942d44c7194607649817216aeb5d65c6acad6.zip |
Merge tag 'v0.8.4' into stable
Release v0.8.4
Diffstat (limited to 'docker')
-rw-r--r-- | docker/.htaccess | 15 | ||||
-rw-r--r-- | docker/development/Dockerfile | 32 | ||||
-rw-r--r-- | docker/development/nginx.conf | 7 | ||||
-rw-r--r-- | docker/production/Dockerfile | 25 | ||||
-rw-r--r-- | docker/production/nginx.conf | 7 | ||||
-rw-r--r-- | docker/production/stable/Dockerfile | 25 | ||||
-rw-r--r-- | docker/production/stable/nginx.conf | 7 |
7 files changed, 97 insertions, 21 deletions
diff --git a/docker/.htaccess b/docker/.htaccess index b584d98c..f601c1ee 100644 --- a/docker/.htaccess +++ b/docker/.htaccess | |||
@@ -1,2 +1,13 @@ | |||
1 | Allow from none | 1 | <IfModule version_module> |
2 | Deny from all | 2 | <IfVersion >= 2.4> |
3 | Require all denied | ||
4 | </IfVersion> | ||
5 | <IfVersion < 2.4> | ||
6 | Allow from none | ||
7 | Deny from all | ||
8 | </IfVersion> | ||
9 | </IfModule> | ||
10 | |||
11 | <IfModule !version_module> | ||
12 | Require all denied | ||
13 | </IfModule> | ||
diff --git a/docker/development/Dockerfile b/docker/development/Dockerfile index 2ed59b89..d9ef8da7 100644 --- a/docker/development/Dockerfile +++ b/docker/development/Dockerfile | |||
@@ -1,26 +1,36 @@ | |||
1 | FROM debian:jessie | 1 | FROM debian:jessie |
2 | MAINTAINER Shaarli Community | 2 | MAINTAINER Shaarli Community |
3 | 3 | ||
4 | ENV TERM dumb | ||
4 | RUN apt-get update \ | 5 | RUN apt-get update \ |
5 | && apt-get install -y \ | 6 | && apt-get install --no-install-recommends -y \ |
6 | nginx-light php5-fpm php5-gd supervisor \ | 7 | ca-certificates \ |
7 | git nano | 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 | ||
8 | 22 | ||
9 | ADD https://getcomposer.org/composer.phar /usr/local/bin/composer | 23 | ADD https://getcomposer.org/composer.phar /usr/local/bin/composer |
10 | RUN chmod 755 /usr/local/bin/composer | 24 | RUN chmod 755 /usr/local/bin/composer |
11 | 25 | ||
12 | COPY nginx.conf /etc/nginx/nginx.conf | ||
13 | COPY supervised.conf /etc/supervisor/conf.d/supervised.conf | ||
14 | RUN echo "<?php phpinfo(); ?>" > /var/www/index.php | ||
15 | |||
16 | WORKDIR /var/www | 26 | WORKDIR /var/www |
27 | RUN git clone https://github.com/shaarli/Shaarli.git shaarli \ | ||
28 | && cd shaarli \ | ||
29 | && composer --prefer-dist install | ||
17 | RUN rm -rf html \ | 30 | RUN rm -rf html \ |
18 | && git clone https://github.com/shaarli/Shaarli.git shaarli \ | 31 | && echo "<?php phpinfo(); ?>" > index.php \ |
19 | && chown -R www-data:www-data . | 32 | && chown -R www-data:www-data . |
20 | 33 | ||
21 | WORKDIR /var/www/shaarli | ||
22 | RUN composer install | ||
23 | |||
24 | VOLUME /var/www/shaarli/data | 34 | VOLUME /var/www/shaarli/data |
25 | 35 | ||
26 | EXPOSE 80 | 36 | EXPOSE 80 |
diff --git a/docker/development/nginx.conf b/docker/development/nginx.conf index cda09b56..ac0c6c61 100644 --- a/docker/development/nginx.conf +++ b/docker/development/nginx.conf | |||
@@ -11,6 +11,8 @@ http { | |||
11 | default_type application/octet-stream; | 11 | default_type application/octet-stream; |
12 | keepalive_timeout 20; | 12 | keepalive_timeout 20; |
13 | 13 | ||
14 | client_max_body_size 10m; | ||
15 | |||
14 | index index.html index.php; | 16 | index index.html index.php; |
15 | 17 | ||
16 | server { | 18 | server { |
@@ -49,6 +51,11 @@ http { | |||
49 | add_header Cache-Control "public, must-revalidate, proxy-revalidate"; | 51 | add_header Cache-Control "public, must-revalidate, proxy-revalidate"; |
50 | } | 52 | } |
51 | 53 | ||
54 | location = /favicon.ico { | ||
55 | # serve the Shaarli favicon from its custom location | ||
56 | alias /var/www/shaarli/images/favicon.ico; | ||
57 | } | ||
58 | |||
52 | location ~ (index)\.php$ { | 59 | location ~ (index)\.php$ { |
53 | # filter and proxy PHP requests to PHP-FPM | 60 | # filter and proxy PHP requests to PHP-FPM |
54 | fastcgi_pass unix:/var/run/php5-fpm.sock; | 61 | fastcgi_pass unix:/var/run/php5-fpm.sock; |
diff --git a/docker/production/Dockerfile b/docker/production/Dockerfile index 3db4eb56..d0509115 100644 --- a/docker/production/Dockerfile +++ b/docker/production/Dockerfile | |||
@@ -1,17 +1,34 @@ | |||
1 | FROM debian:jessie | 1 | FROM debian:jessie |
2 | MAINTAINER Shaarli Community | 2 | MAINTAINER Shaarli Community |
3 | 3 | ||
4 | ENV TERM dumb | ||
4 | RUN apt-get update \ | 5 | RUN apt-get update \ |
5 | && apt-get install -y curl nginx-light php5-fpm php5-gd supervisor | 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 | ||
6 | 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 | ||
7 | COPY nginx.conf /etc/nginx/nginx.conf | 19 | COPY nginx.conf /etc/nginx/nginx.conf |
8 | COPY supervised.conf /etc/supervisor/conf.d/supervised.conf | 20 | COPY supervised.conf /etc/supervisor/conf.d/supervised.conf |
9 | 21 | ||
22 | ADD https://getcomposer.org/composer.phar /usr/local/bin/composer | ||
23 | RUN chmod 755 /usr/local/bin/composer | ||
24 | |||
10 | WORKDIR /var/www | 25 | WORKDIR /var/www |
11 | RUN rm -rf html \ | 26 | RUN curl -L https://github.com/shaarli/Shaarli/archive/master.tar.gz | tar xzf - \ |
12 | && curl -L https://github.com/shaarli/Shaarli/archive/master.tar.gz | tar xvzf - \ | ||
13 | && mv Shaarli-master shaarli \ | 27 | && mv Shaarli-master shaarli \ |
14 | && chown -R www-data:www-data shaarli | 28 | && cd shaarli \ |
29 | && composer --prefer-dist --no-dev install | ||
30 | RUN rm -rf html \ | ||
31 | && chown -R www-data:www-data . | ||
15 | 32 | ||
16 | VOLUME /var/www/shaarli/data | 33 | VOLUME /var/www/shaarli/data |
17 | 34 | ||
diff --git a/docker/production/nginx.conf b/docker/production/nginx.conf index e23c4587..5ffa02d0 100644 --- a/docker/production/nginx.conf +++ b/docker/production/nginx.conf | |||
@@ -11,6 +11,8 @@ http { | |||
11 | default_type application/octet-stream; | 11 | default_type application/octet-stream; |
12 | keepalive_timeout 20; | 12 | keepalive_timeout 20; |
13 | 13 | ||
14 | client_max_body_size 10m; | ||
15 | |||
14 | index index.html index.php; | 16 | index index.html index.php; |
15 | 17 | ||
16 | server { | 18 | server { |
@@ -41,6 +43,11 @@ http { | |||
41 | add_header Cache-Control "public, must-revalidate, proxy-revalidate"; | 43 | add_header Cache-Control "public, must-revalidate, proxy-revalidate"; |
42 | } | 44 | } |
43 | 45 | ||
46 | location = /favicon.ico { | ||
47 | # serve the Shaarli favicon from its custom location | ||
48 | alias /var/www/shaarli/images/favicon.ico; | ||
49 | } | ||
50 | |||
44 | location ~ (index)\.php$ { | 51 | location ~ (index)\.php$ { |
45 | # filter and proxy PHP requests to PHP-FPM | 52 | # filter and proxy PHP requests to PHP-FPM |
46 | fastcgi_pass unix:/var/run/php5-fpm.sock; | 53 | fastcgi_pass unix:/var/run/php5-fpm.sock; |
diff --git a/docker/production/stable/Dockerfile b/docker/production/stable/Dockerfile index 2bb3948c..fc9588b0 100644 --- a/docker/production/stable/Dockerfile +++ b/docker/production/stable/Dockerfile | |||
@@ -1,17 +1,34 @@ | |||
1 | FROM debian:jessie | 1 | FROM debian:jessie |
2 | MAINTAINER Shaarli Community | 2 | MAINTAINER Shaarli Community |
3 | 3 | ||
4 | ENV TERM dumb | ||
4 | RUN apt-get update \ | 5 | RUN apt-get update \ |
5 | && apt-get install -y curl nginx-light php5-fpm php5-gd supervisor | 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 | ||
6 | 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 | ||
7 | COPY nginx.conf /etc/nginx/nginx.conf | 19 | COPY nginx.conf /etc/nginx/nginx.conf |
8 | COPY supervised.conf /etc/supervisor/conf.d/supervised.conf | 20 | COPY supervised.conf /etc/supervisor/conf.d/supervised.conf |
9 | 21 | ||
22 | ADD https://getcomposer.org/composer.phar /usr/local/bin/composer | ||
23 | RUN chmod 755 /usr/local/bin/composer | ||
24 | |||
10 | WORKDIR /var/www | 25 | WORKDIR /var/www |
11 | RUN rm -rf html \ | 26 | RUN curl -L https://github.com/shaarli/Shaarli/archive/stable.tar.gz | tar xzf - \ |
12 | && curl -L https://github.com/shaarli/Shaarli/archive/stable.tar.gz | tar xvzf - \ | ||
13 | && mv Shaarli-stable shaarli \ | 27 | && mv Shaarli-stable shaarli \ |
14 | && chown -R www-data:www-data shaarli | 28 | && cd shaarli \ |
29 | && composer --prefer-dist --no-dev install | ||
30 | RUN rm -rf html \ | ||
31 | && chown -R www-data:www-data . | ||
15 | 32 | ||
16 | VOLUME /var/www/shaarli/data | 33 | VOLUME /var/www/shaarli/data |
17 | 34 | ||
diff --git a/docker/production/stable/nginx.conf b/docker/production/stable/nginx.conf index e23c4587..5ffa02d0 100644 --- a/docker/production/stable/nginx.conf +++ b/docker/production/stable/nginx.conf | |||
@@ -11,6 +11,8 @@ http { | |||
11 | default_type application/octet-stream; | 11 | default_type application/octet-stream; |
12 | keepalive_timeout 20; | 12 | keepalive_timeout 20; |
13 | 13 | ||
14 | client_max_body_size 10m; | ||
15 | |||
14 | index index.html index.php; | 16 | index index.html index.php; |
15 | 17 | ||
16 | server { | 18 | server { |
@@ -41,6 +43,11 @@ http { | |||
41 | add_header Cache-Control "public, must-revalidate, proxy-revalidate"; | 43 | add_header Cache-Control "public, must-revalidate, proxy-revalidate"; |
42 | } | 44 | } |
43 | 45 | ||
46 | location = /favicon.ico { | ||
47 | # serve the Shaarli favicon from its custom location | ||
48 | alias /var/www/shaarli/images/favicon.ico; | ||
49 | } | ||
50 | |||
44 | location ~ (index)\.php$ { | 51 | location ~ (index)\.php$ { |
45 | # filter and proxy PHP requests to PHP-FPM | 52 | # filter and proxy PHP requests to PHP-FPM |
46 | fastcgi_pass unix:/var/run/php5-fpm.sock; | 53 | fastcgi_pass unix:/var/run/php5-fpm.sock; |