新增nginx unit

This commit is contained in:
xingsu1021
2022-05-23 14:08:49 +08:00
parent 14774ae053
commit 581329121e
2 changed files with 3 additions and 3 deletions

1
conf.json Normal file
View File

@@ -0,0 +1 @@
{"settings":{"http":{"header_read_timeout":30,"body_read_timeout":30,"send_timeout":30,"idle_timeout":180,"max_body_size":10485760,"static":{"mime_types":{"text/plain":[".log","README","CHANGES"]}},"discard_unsafe_fields":false}},"listeners":{"*:80":{"pass":"routes"}},"routes":[{"match":{"uri":"/static/*"},"action":{"share":"/home/data/www$uri"}},{"action":{"pass":"applications/pthelper"}}],"applications":{"pthelper":{"type":"python 3","protocol":"wsgi","path":"/home/data/www/","processes":2,"module":"pthelper.wsgi","environment":{"DJANGO_SETTINGS_MODULE":"pthelper.settings"}}}}

View File

@@ -2,7 +2,6 @@
#初始化数据库
python3 manage.py migrate
python3 manage.py runserver 0.0.0.0:80
#gunicorn pthelper.wsgi:application --bind 0.0.0.0:8000 -w 4 --threads 2 --daemon
#python3 manage.py runserver 0.0.0.0:80
#nginx -g 'daemon off;'
/usr/sbin/unitd --no-daemon --control 0.0.0.0:60081 --user root --group root