Browse Source
+ supervisor, python and uvicorn in workspace74 (partially commit - no fully worked solution)
uvicorn
+ supervisor, python and uvicorn in workspace74 (partially commit - no fully worked solution)
uvicorn
qemu-test
4 weeks ago
7 changed files with 118 additions and 36 deletions
-
3.env.example
-
32config/nginx/conf.d/z-python.conf.example
-
3config/supervisor/.gitignore
-
9config/supervisor/uvicorn.conf.example
-
3docker-compose.base.yml
-
30dockerfiles/workspace/aliases.sh.example
-
74dockerfiles/workspace/workspace74.Dockerfile
@ -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; |
|||
} |
|||
} |
@ -0,0 +1,3 @@ |
|||
* |
|||
!*.example |
|||
!.gitignore |
@ -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 |
@ -1,30 +0,0 @@ |
|||
#! /bin/bash |
|||
|
|||
# Colors used for status updates |
|||
ESC_SEQ="\x1b[" |
|||
COL_RESET=$ESC_SEQ"39;49;00m" |
|||
COL_RED=$ESC_SEQ"31;01m" |
|||
COL_GREEN=$ESC_SEQ"32;01m" |
|||
COL_YELLOW=$ESC_SEQ"33;01m" |
|||
COL_BLUE=$ESC_SEQ"34;01m" |
|||
COL_MAGENTA=$ESC_SEQ"35;01m" |
|||
COL_CYAN=$ESC_SEQ"36;01m" |
|||
|
|||
# Detect which `ls` flavor is in use |
|||
if ls --color > /dev/null 2>&1; then # GNU `ls` |
|||
colorflag="--color" |
|||
export LS_COLORS='no=00:fi=00:di=01;31:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:' |
|||
else # macOS `ls` |
|||
colorflag="-G" |
|||
export LSCOLORS='BxBxhxDxfxhxhxhxhxcxcx' |
|||
fi |
|||
|
|||
# Always use color output for `ls` |
|||
alias ls="command ls ${colorflag}" |
|||
|
|||
alias gst='git status' |
|||
alias ga='git add' |
|||
alias gc='git commit -m' |
|||
alias gush='git push' |
|||
alias gull='git pull' |
|||
alias gb='git branch' |
Write
Preview
Loading…
Cancel
Save
Reference in new issue