Modify launch script and improve install script
Now universally refers to python3 instead of expecting gunicorn to be on PATH. Now installs requirements into system user's environment for use.
This commit is contained in:
parent
f1c3e05d80
commit
e8cb428fa4
2 changed files with 2 additions and 1 deletions
1
install
1
install
|
@ -1,5 +1,6 @@
|
|||
adduser --system --home /otp/radical-api radical-api
|
||||
cp -r * /otp/radical-api
|
||||
sudo -u radical-api python3 -m pip install -r /otp/radical-api/requirements.txt
|
||||
cp radical-api.service /etc/systemd/system
|
||||
addgroup --system radical-api
|
||||
adduser radical-api radical-api
|
||||
|
|
2
main.py
Normal file → Executable file
2
main.py
Normal file → Executable file
|
@ -2,7 +2,7 @@ import sys
|
|||
|
||||
from core.wrapper import Wrapper
|
||||
|
||||
api = Wrapper(['gunicorn', "-k", "uvicorn.workers.UvicornWorker",
|
||||
api = Wrapper(['python3', '-m', 'gunicorn', "-k", "uvicorn.workers.UvicornWorker",
|
||||
"--log-config", "log.conf",
|
||||
'--bind', '0.0.0.0:8000',
|
||||
'api:api'], sys.stdout)
|
||||
|
|
Loading…
Reference in a new issue