aboutsummaryrefslogtreecommitdiffhomepage
path: root/docker/production
diff options
context:
space:
mode:
Diffstat (limited to 'docker/production')
-rw-r--r--docker/production/Dockerfile25
-rw-r--r--docker/production/nginx.conf7
-rw-r--r--docker/production/stable/Dockerfile25
-rw-r--r--docker/production/stable/nginx.conf7
4 files changed, 56 insertions, 8 deletions
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 @@
1FROM debian:jessie 1FROM debian:jessie
2MAINTAINER Shaarli Community 2MAINTAINER Shaarli Community
3 3
4ENV TERM dumb
4RUN apt-get update \ 5RUN 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
17RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini
18RUN sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini
7COPY nginx.conf /etc/nginx/nginx.conf 19COPY nginx.conf /etc/nginx/nginx.conf
8COPY supervised.conf /etc/supervisor/conf.d/supervised.conf 20COPY supervised.conf /etc/supervisor/conf.d/supervised.conf
9 21
22ADD https://getcomposer.org/composer.phar /usr/local/bin/composer
23RUN chmod 755 /usr/local/bin/composer
24
10WORKDIR /var/www 25WORKDIR /var/www
11RUN rm -rf html \ 26RUN 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
30RUN rm -rf html \
31 && chown -R www-data:www-data .
15 32
16VOLUME /var/www/shaarli/data 33VOLUME /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 @@
1FROM debian:jessie 1FROM debian:jessie
2MAINTAINER Shaarli Community 2MAINTAINER Shaarli Community
3 3
4ENV TERM dumb
4RUN apt-get update \ 5RUN 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
17RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini
18RUN sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini
7COPY nginx.conf /etc/nginx/nginx.conf 19COPY nginx.conf /etc/nginx/nginx.conf
8COPY supervised.conf /etc/supervisor/conf.d/supervised.conf 20COPY supervised.conf /etc/supervisor/conf.d/supervised.conf
9 21
22ADD https://getcomposer.org/composer.phar /usr/local/bin/composer
23RUN chmod 755 /usr/local/bin/composer
24
10WORKDIR /var/www 25WORKDIR /var/www
11RUN rm -rf html \ 26RUN 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
30RUN rm -rf html \
31 && chown -R www-data:www-data .
15 32
16VOLUME /var/www/shaarli/data 33VOLUME /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;