File size: 751 Bytes
113dbd0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# run the server in supervisor
# supervisord -c /etc/supervisor/supervisor.conf
# stop the server in supervisor
# supervisorctl -c /etc/supervisor/supervisor.conf stop all

# install the supervisor
# apt-get install -y supervisor

[program:sdif_http_server]
directory=/home/lee/code/sdif
command=GOOGLE_APPLICATION_CREDENTIALS=secrets/google-credentials.json PYTHONPATH=. uvicorn --port 8000 --timeout-keep-alive 600 --workers 1 --backlog 1 --limit-concurrency 4 main:app
autostart=true
autorestart=true
environment=VIRTUAL_ENV="/home/lee/code/sdif/.env/",PATH="/opt/app/sdif/.env/bin",\
    HOME="/home/lee",GOOGLE_APPLICATION_CREDENTIALS="secrets/google-credentials.json",PYTHONPATH='/home/lee/code/sdif'
stdout_logfile=syslog
stderr_logfile=syslog