update(): alpine 3.7

This commit is contained in:
Hardware
2018-01-13 14:57:15 +01:00
parent 94d9d894c3
commit 7b8e9f7c5e
9 changed files with 125 additions and 40 deletions

View File

@@ -0,0 +1,78 @@
worker_processes auto;
pid /tmp/nginx.pid;
daemon off;
events {
worker_connections 1024;
use epoll;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log off;
error_log /tmp/ngx_error.log error;
sendfile on;
keepalive_timeout 15;
keepalive_disable msie6;
keepalive_requests 100;
tcp_nopush on;
tcp_nodelay on;
server_tokens off;
fastcgi_temp_path /tmp/fastcgi 1 2;
client_body_temp_path /tmp/client_body 1 2;
proxy_temp_path /tmp/proxy 1 2;
uwsgi_temp_path /tmp/uwsgi 1 2;
scgi_temp_path /tmp/scgi 1 2;
gzip on;
gzip_comp_level 5;
gzip_min_length 512;
gzip_buffers 4 8k;
gzip_proxied any;
gzip_vary on;
gzip_disable "msie6";
gzip_types
text/css
text/javascript
text/xml
text/plain
text/x-component
application/javascript
application/x-javascript
application/json
application/xml
application/rss+xml
application/vnd.ms-fontobject
font/truetype
font/opentype
image/svg+xml;
server {
listen 8888;
root /rainloop;
index index.php;
charset utf-8;
client_max_body_size <UPLOAD_MAX_SIZE>;
location ^~ /data {
deny all;
}
location / {
try_files $uri $uri/ index.php;
}
location ~* \.php$ {
fastcgi_index index.php;
fastcgi_pass unix:/tmp/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
}
}

View File

@@ -0,0 +1,14 @@
[global]
daemonize = no
[www]
listen = /tmp/php-fpm.sock
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
chdir = /
php_admin_value[expose_php] = Off
php_admin_value[post_max_size] = <UPLOAD_MAX_SIZE>
php_admin_value[upload_max_filesize] = <UPLOAD_MAX_SIZE>

View File

@@ -1,30 +0,0 @@
server {
listen 8888;
root /rainloop;
index index.php;
charset utf-8;
location ^~ /data {
deny all;
return 404;
}
location / {
try_files $uri $uri/ index.php;
}
location ~* \.php$ {
try_files $uri =404;
include /nginx/conf/fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_index index.php;
fastcgi_pass unix:/php/run/php-fpm.sock;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
fastcgi_param REMOTE_ADDR $http_x_real_ip;
}
}

View File

@@ -0,0 +1,2 @@
#!/bin/sh
exit 0

View File

@@ -0,0 +1,2 @@
#!/bin/sh
exec nginx

2
rootfs/services/php/run Normal file
View File

@@ -0,0 +1,2 @@
#!/bin/sh
exec php-fpm7

View File

@@ -1,11 +1,10 @@
#!/bin/sh
# Set attachment size and memory limit
sed -i -e "s/<UPLOAD_MAX_SIZE>/$UPLOAD_MAX_SIZE/g" /nginx/conf/nginx.conf /php/etc/php-fpm.conf \
-e "s/<MEMORY_LIMIT>/$MEMORY_LIMIT/g" /php/etc/php-fpm.conf
# Set attachment size limit
sed -i "s/<UPLOAD_MAX_SIZE>/$UPLOAD_MAX_SIZE/g" /etc/php7/php-fpm.conf /etc/nginx/nginx.conf
# Fix permissions
chown -R $UID:$GID /rainloop/data /etc/s6.d /nginx /php /var/log
chown -R $UID:$GID /rainloop/data /services /var/log /var/lib/nginx
# RUN !
exec su-exec $UID:$GID /bin/s6-svscan /etc/s6.d
exec su-exec $UID:$GID /bin/s6-svscan /services