first commit
This commit is contained in:
37
_docker/nginx/app.conf
Normal file
37
_docker/nginx/app.conf
Normal file
@@ -0,0 +1,37 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
index index.php index.html;
|
||||
root /app;
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
|
||||
# set client body size#
|
||||
client_max_body_size 8M;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
|
||||
try_files $uri $uri/ /index.php;
|
||||
if (!-e $request_filename){
|
||||
rewrite ^/admin/(.*)$ /admin/index.php?/$1? last;
|
||||
rewrite ^/api/(.*)$ /api/index.php?/$1? last;
|
||||
rewrite ^/webhook/(.*)$ /webhook/index.php?/$1? last;
|
||||
rewrite ^/(.*)$ /index.php?/$1? last;
|
||||
}
|
||||
|
||||
location ~* \.(jpe?g|gif|png|bmp|ico|pdf|zip|htm|html|docx?|xlsx?|pptx?|txt|wav|swf|avi|mp\d)$ {
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
try_files $uri $uri/ $document_root$uri /index.php?$args;
|
||||
expires 1w;
|
||||
}
|
||||
}
|
||||
27
_docker/nginx/nginx.conf
Normal file
27
_docker/nginx/nginx.conf
Normal file
@@ -0,0 +1,27 @@
|
||||
user nginx;
|
||||
|
||||
worker_processes 1;
|
||||
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
sendfile on;
|
||||
|
||||
keepalive_timeout 65;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
}
|
||||
9
_docker/php-fpm/opcache.ini
Normal file
9
_docker/php-fpm/opcache.ini
Normal file
@@ -0,0 +1,9 @@
|
||||
[opcache]
|
||||
opcache.enable=1
|
||||
opcache.revalidate_freq=0
|
||||
opcache.validate_timestamps=0
|
||||
opcache.max_accelerated_files=10000
|
||||
opcache.memory_consumption=192
|
||||
opcache.max_wasted_percentage=10
|
||||
opcache.interned_strings_buffer=16
|
||||
opcache.fast_shutdown=1
|
||||
0
_docker/php-fpm/php.ini
Normal file
0
_docker/php-fpm/php.ini
Normal file
15
_docker/php-fpm/www.conf
Normal file
15
_docker/php-fpm/www.conf
Normal file
@@ -0,0 +1,15 @@
|
||||
[global]
|
||||
daemonize=no
|
||||
|
||||
[www]
|
||||
user=www-data
|
||||
group=www-data
|
||||
|
||||
listen=127.0.0.1:9000
|
||||
|
||||
pm=dynamic
|
||||
pm.max_children=40
|
||||
pm.start_servers=2
|
||||
pm.min_spare_servers=2
|
||||
pm.max_spare_servers=4
|
||||
pm.max_requests=500
|
||||
9
_docker/supervisord/supervisord.conf
Normal file
9
_docker/supervisord/supervisord.conf
Normal file
@@ -0,0 +1,9 @@
|
||||
[program:php-fpm]
|
||||
command=/usr/local/sbin/php-fpm
|
||||
|
||||
[program:nginx]
|
||||
command=/usr/sbin/nginx -c /etc/nginx/nginx.conf -g "daemon off;"
|
||||
|
||||
[supervisord]
|
||||
logfile=/var/log/supervisord.log
|
||||
nodaemon=true
|
||||
Reference in New Issue
Block a user