mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-07 02:22:48 +08:00
增加docker配置;修复重置命令错误;优化timer请求机制支持本地
This commit is contained in:
30
docker/nginx.conf
Normal file
30
docker/nginx.conf
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
root /var/www/html/public;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
server_name _;
|
||||
|
||||
# 上传大小不限制
|
||||
client_max_body_size 8192m;
|
||||
|
||||
# 运行时长不限制
|
||||
fastcgi_read_timeout 60000;
|
||||
|
||||
location / {
|
||||
if (!-e $request_filename) {
|
||||
rewrite ^(.*)$ /index.php?s=$1 last; break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
include fastcgi_params;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
}
|
||||
11
docker/phprun.ini
Normal file
11
docker/phprun.ini
Normal file
@@ -0,0 +1,11 @@
|
||||
; 内存不限制
|
||||
memory_limit = -1
|
||||
|
||||
; 上传文件大小不限制
|
||||
upload_max_filesize = -1
|
||||
|
||||
; 运行时长不限制
|
||||
max_execution_time = 0
|
||||
|
||||
; POST大小不限制
|
||||
post_max_size = -1
|
||||
21
docker/run.sh
Normal file
21
docker/run.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
# 将代码中的nginx复制到nginx配置文件中
|
||||
cp /var/www/html/docker/nginx.conf /etc/nginx/sites-available/default
|
||||
ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
|
||||
|
||||
# 将代码中的php配置文件复制到php配置文件中
|
||||
cp /var/www/html/docker/phprun.ini /usr/local/etc/php/conf.d
|
||||
|
||||
# 运行redis
|
||||
nohup redis-server --requirepass "" &
|
||||
# 运行定时任务
|
||||
nohup php /var/www/html/think timer --local &
|
||||
|
||||
# 如果第一个参数是server,或者没有参数,则运行server
|
||||
if [ "$1" = "server" ] || [ "$1" = "" ]; then
|
||||
# 运行nginx
|
||||
service nginx start
|
||||
# 运行php-fpm
|
||||
php-fpm
|
||||
else
|
||||
php "/var/www/html/""$@"
|
||||
fi
|
||||
Reference in New Issue
Block a user