aboutsummaryrefslogtreecommitdiffhomepage
path: root/docker/development
diff options
context:
space:
mode:
Diffstat (limited to 'docker/development')
-rw-r--r--docker/development/Dockerfile32
-rw-r--r--docker/development/nginx.conf7
2 files changed, 28 insertions, 11 deletions
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 @@
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 \ 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
18RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini
19RUN sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini
20COPY nginx.conf /etc/nginx/nginx.conf
21COPY supervised.conf /etc/supervisor/conf.d/supervised.conf
8 22
9ADD https://getcomposer.org/composer.phar /usr/local/bin/composer 23ADD https://getcomposer.org/composer.phar /usr/local/bin/composer
10RUN chmod 755 /usr/local/bin/composer 24RUN chmod 755 /usr/local/bin/composer
11 25
12COPY nginx.conf /etc/nginx/nginx.conf
13COPY supervised.conf /etc/supervisor/conf.d/supervised.conf
14RUN echo "<?php phpinfo(); ?>" > /var/www/index.php
15
16WORKDIR /var/www 26WORKDIR /var/www
27RUN git clone https://github.com/shaarli/Shaarli.git shaarli \
28 && cd shaarli \
29 && composer --prefer-dist install
17RUN rm -rf html \ 30RUN 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
21WORKDIR /var/www/shaarli
22RUN composer install
23
24VOLUME /var/www/shaarli/data 34VOLUME /var/www/shaarli/data
25 35
26EXPOSE 80 36EXPOSE 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;