diff options
Diffstat (limited to 'docker')
-rw-r--r-- | docker/etc/nginx/nginx.conf | 69 | ||||
-rw-r--r-- | docker/etc/php7/conf.d/local.ini | 15 | ||||
-rw-r--r-- | docker/etc/php7/php-fpm.conf | 19 | ||||
-rw-r--r-- | docker/etc/php7/php-fpm.d/env.conf (renamed from docker/php/env.conf) | 0 | ||||
-rwxr-xr-x | docker/etc/services.d/.s6-svscan/finish | 2 | ||||
-rwxr-xr-x | docker/etc/services.d/cron/run (renamed from docker/services.d/cron/run) | 0 | ||||
-rwxr-xr-x | docker/etc/services.d/nginx/run | 3 | ||||
-rwxr-xr-x | docker/etc/services.d/php/run | 2 | ||||
-rw-r--r-- | docker/kanboard/config.php | 4 | ||||
-rwxr-xr-x | docker/usr/local/bin/entrypoint.sh | 6 | ||||
-rw-r--r-- | docker/var/spool/crontabs/nginx (renamed from docker/crontab/cronjob.alpine) | 0 |
11 files changed, 116 insertions, 4 deletions
diff --git a/docker/etc/nginx/nginx.conf b/docker/etc/nginx/nginx.conf new file mode 100644 index 00000000..6ba545f6 --- /dev/null +++ b/docker/etc/nginx/nginx.conf @@ -0,0 +1,69 @@ +user nginx; +worker_processes 1; +pid /var/run/nginx.pid; + +events { + worker_connections 1024; +} + +http { + include mime.types; + default_type application/octet-stream; + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + server_tokens off; + access_log off; + error_log /dev/stderr; + + server { + listen 80; + server_name localhost; + index index.php; + root /var/www/app; + client_max_body_size 32M; + + location / { + try_files $uri $uri/ /index.php$is_args$args; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_index index.php; + include fastcgi_params; + } + + location ~* ^.+\.(log|sqlite)$ { + return 404; + } + + location ~ /\.ht { + return 404; + } + + location ~* ^.+\.(ico|jpg|gif|png|css|js|svg|eot|ttf|woff|woff2|otf)$ { + log_not_found off; + expires 7d; + etag on; + } + + gzip on; + gzip_comp_level 3; + gzip_disable "msie6"; + gzip_vary on; + gzip_types + text/javascript + application/javascript + application/json + text/xml + application/xml + application/rss+xml + text/css + text/plain; + } +} diff --git a/docker/etc/php7/conf.d/local.ini b/docker/etc/php7/conf.d/local.ini new file mode 100644 index 00000000..0c1795f2 --- /dev/null +++ b/docker/etc/php7/conf.d/local.ini @@ -0,0 +1,15 @@ +expose_php = Off +error_reporting = E_ALL +display_errors = Off +log_errors = On +error_log = /dev/stderr +date.timezone = UTC +allow_url_fopen = On +post_max_size = 32M +upload_max_filesize = 32M +opcache.max_accelerated_files = 7963 +opcache.validate_timestamps = Off +opcache.save_comments = 0 +opcache.load_comments = 0 +opcache.fast_shutdown = 1 +opcache.enable_file_override = On diff --git a/docker/etc/php7/php-fpm.conf b/docker/etc/php7/php-fpm.conf new file mode 100644 index 00000000..ea227529 --- /dev/null +++ b/docker/etc/php7/php-fpm.conf @@ -0,0 +1,19 @@ +[global] +error_log = /proc/self/fd/2 +log_level = error +daemonize = no + +[www] +catch_workers_output = yes +user = nginx +group = nginx +listen.owner = nginx +listen.group = nginx +listen = /var/run/php-fpm.sock +pm = dynamic +pm.max_children = 20 +pm.start_servers = 1 +pm.min_spare_servers = 1 +pm.max_spare_servers = 3 +pm.max_requests = 2048 +include = /etc/php7/php-fpm.d/env.conf
\ No newline at end of file diff --git a/docker/php/env.conf b/docker/etc/php7/php-fpm.d/env.conf index 23f6ce3d..23f6ce3d 100644 --- a/docker/php/env.conf +++ b/docker/etc/php7/php-fpm.d/env.conf diff --git a/docker/etc/services.d/.s6-svscan/finish b/docker/etc/services.d/.s6-svscan/finish new file mode 100755 index 00000000..fc3b1e93 --- /dev/null +++ b/docker/etc/services.d/.s6-svscan/finish @@ -0,0 +1,2 @@ +#!/bin/sh +/bin/true
\ No newline at end of file diff --git a/docker/services.d/cron/run b/docker/etc/services.d/cron/run index da378099..da378099 100755 --- a/docker/services.d/cron/run +++ b/docker/etc/services.d/cron/run diff --git a/docker/etc/services.d/nginx/run b/docker/etc/services.d/nginx/run new file mode 100755 index 00000000..7478cd75 --- /dev/null +++ b/docker/etc/services.d/nginx/run @@ -0,0 +1,3 @@ +#!/bin/execlineb -P + +nginx -g "daemon off;"
\ No newline at end of file diff --git a/docker/etc/services.d/php/run b/docker/etc/services.d/php/run new file mode 100755 index 00000000..6b093238 --- /dev/null +++ b/docker/etc/services.d/php/run @@ -0,0 +1,2 @@ +#!/bin/execlineb -P +php-fpm7 -F
\ No newline at end of file diff --git a/docker/kanboard/config.php b/docker/kanboard/config.php deleted file mode 100644 index 58daff48..00000000 --- a/docker/kanboard/config.php +++ /dev/null @@ -1,4 +0,0 @@ -<?php - -define('ENABLE_URL_REWRITE', true); -define('LOG_DRIVER', 'stderr'); diff --git a/docker/usr/local/bin/entrypoint.sh b/docker/usr/local/bin/entrypoint.sh new file mode 100755 index 00000000..fe49c41b --- /dev/null +++ b/docker/usr/local/bin/entrypoint.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +chown -R nginx:nginx /var/www/app/data +chown -R nginx:nginx /var/www/app/plugins + +exec /bin/s6-svscan /etc/services.d diff --git a/docker/crontab/cronjob.alpine b/docker/var/spool/crontabs/nginx index e92aa0e3..e92aa0e3 100644 --- a/docker/crontab/cronjob.alpine +++ b/docker/var/spool/crontabs/nginx |