+ supervisor, python and uvicorn in workspace74 (partially commit - no fully worked solution)
This commit is contained in:
32
config/nginx/conf.d/z-python.conf.example
Normal file
32
config/nginx/conf.d/z-python.conf.example
Normal file
@ -0,0 +1,32 @@
|
||||
map $http_host $python_upstream {
|
||||
someproject.local.wpstudio.ru http://workspace74:8000;
|
||||
}
|
||||
|
||||
map $http_host $python_root {
|
||||
someproject.local.wpstudio.ru /usr/share/nginx/python/someproject;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name
|
||||
someproject.local.wpstudio.ru
|
||||
;
|
||||
|
||||
location / {
|
||||
resolver 127.0.0.11;
|
||||
proxy_pass $python_upstream;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
|
||||
root $python_root;
|
||||
|
||||
location ~ /media {
|
||||
expires max;
|
||||
}
|
||||
|
||||
location ~ /static {
|
||||
expires max;
|
||||
}
|
||||
}
|
3
config/supervisor/.gitignore
vendored
Normal file
3
config/supervisor/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
*
|
||||
!*.example
|
||||
!.gitignore
|
9
config/supervisor/uvicorn.conf.example
Normal file
9
config/supervisor/uvicorn.conf.example
Normal file
@ -0,0 +1,9 @@
|
||||
[fcgi-program:uvicorn]
|
||||
process_name=uvicorn-tourtennis-%(process_num)d
|
||||
socket=tcp://localhost:8000
|
||||
command=/var/python/tourtennis/.venv/bin/uvicorn --fd 0 main:App
|
||||
autostart=true
|
||||
autorestart=true
|
||||
numprocs=1
|
||||
user=laradock
|
||||
redirect_stderr=true
|
Reference in New Issue
Block a user