aboutsummaryrefslogtreecommitdiffhomepage
path: root/.docker
diff options
context:
space:
mode:
authorVirtualTam <virtualtam+github@flibidi.net>2018-06-20 16:29:06 +0200
committerGitHub <noreply@github.com>2018-06-20 16:29:06 +0200
commit9e425954817621711a528bb3bd2972692a2a528a (patch)
treee692e493688fea3f8d681c093ed574d90d75daa3 /.docker
parentc648fc34f882ca6a62f5a44d1826bbd2b9852845 (diff)
parent55346c1ebed66ce29dee0eee1fec5602b2d26078 (diff)
downloadShaarli-9e425954817621711a528bb3bd2972692a2a528a.tar.gz
Shaarli-9e425954817621711a528bb3bd2972692a2a528a.tar.zst
Shaarli-9e425954817621711a528bb3bd2972692a2a528a.zip
Merge pull request #1156 from virtualtam/v0.8-dockerfile
v0.8 - Build the Docker image from the local sources
Diffstat (limited to '.docker')
-rw-r--r--.docker/.htaccess13
-rw-r--r--.docker/nginx.conf72
-rw-r--r--.docker/supervised.conf13
3 files changed, 98 insertions, 0 deletions
diff --git a/.docker/.htaccess b/.docker/.htaccess
new file mode 100644
index 00000000..f601c1ee
--- /dev/null
+++ b/.docker/.htaccess
@@ -0,0 +1,13 @@
1<IfModule version_module>
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/nginx.conf b/.docker/nginx.conf
new file mode 100644
index 00000000..e8754d9b
--- /dev/null
+++ b/.docker/nginx.conf
@@ -0,0 +1,72 @@
1user www-data www-data;
2daemon off;
3worker_processes 4;
4
5events {
6 worker_connections 768;
7}
8
9http {
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 / {
52 # Slim - rewrite URLs
53 try_files $uri /index.php$is_args$args;
54 }
55
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
61 # filter and proxy PHP requests to PHP-FPM
62 fastcgi_pass unix:/var/run/php5-fpm.sock;
63 fastcgi_index index.php;
64 include fastcgi.conf;
65 }
66
67 location ~ \.php$ {
68 # deny access to all other PHP scripts
69 deny all;
70 }
71 }
72}
diff --git a/.docker/supervised.conf b/.docker/supervised.conf
new file mode 100644
index 00000000..5acd9795
--- /dev/null
+++ b/.docker/supervised.conf
@@ -0,0 +1,13 @@
1[program:php5-fpm]
2command=/usr/sbin/php5-fpm -F
3priority=5
4autostart=true
5autorestart=true
6
7[program:nginx]
8command=/usr/sbin/nginx
9priority=10
10autostart=true
11autorestart=true
12stdout_events_enabled=true
13stderr_events_enabled=true