U 优化服务启动脚本

pull/103/head
vapao 2020-05-07 18:13:55 +08:00
parent 1e5bd342d5
commit 78c6c9f0e1
5 changed files with 15 additions and 5 deletions

View File

@ -5,5 +5,7 @@
# start api service # start api service
cd $(dirname $(dirname $0)) cd $(dirname $(dirname $0))
source ./venv/bin/activate if [ -f ./venv/bin/activate ]; then
source ./venv/bin/activate
fi
exec gunicorn -b 127.0.0.1:9001 -w 2 --threads 8 --access-logfile - spug.wsgi exec gunicorn -b 127.0.0.1:9001 -w 2 --threads 8 --access-logfile - spug.wsgi

View File

@ -5,5 +5,7 @@
# start monitor service # start monitor service
cd $(dirname $(dirname $0)) cd $(dirname $(dirname $0))
source ./venv/bin/activate if [ -f ./venv/bin/activate ]; then
source ./venv/bin/activate
fi
exec python manage.py runmonitor exec python manage.py runmonitor

View File

@ -5,5 +5,7 @@
# start schedule service # start schedule service
cd $(dirname $(dirname $0)) cd $(dirname $(dirname $0))
source ./venv/bin/activate if [ -f ./venv/bin/activate ]; then
source ./venv/bin/activate
fi
exec python manage.py runscheduler exec python manage.py runscheduler

View File

@ -5,5 +5,7 @@
# start worker service # start worker service
cd $(dirname $(dirname $0)) cd $(dirname $(dirname $0))
source ./venv/bin/activate if [ -f ./venv/bin/activate ]; then
source ./venv/bin/activate
fi
exec python manage.py runworker ssh_exec exec python manage.py runworker ssh_exec

View File

@ -5,5 +5,7 @@
# start websocket service # start websocket service
cd $(dirname $(dirname $0)) cd $(dirname $(dirname $0))
source ./venv/bin/activate if [ -f ./venv/bin/activate ]; then
source ./venv/bin/activate
fi
exec daphne -p 9002 spug.asgi:application exec daphne -p 9002 spug.asgi:application