+ deploy configs

This commit is contained in:
Phil Zhitnikov 2023-07-06 16:48:36 +04:00
parent 3ff1957284
commit 05e323c775
3 changed files with 64 additions and 0 deletions

1
.env Normal file
View File

@ -0,0 +1 @@
APP_HOME=/var/www/phzhik-poizonstore/

34
_deploy/nginx.conf Normal file
View File

@ -0,0 +1,34 @@
upstream django {
server web:8001;
}
server {
set $APP_HOME /var/www/kwork-vbaportal;
listen 80;
charset utf-8;
# max upload size
client_max_body_size 75M; # adjust to taste
# Django media
location /media {
autoindex on;
alias $APP_HOME/media;
}
location /static {
autoindex on;
alias $APP_HOME/assets;
}
location / {
uwsgi_pass django;
uwsgi_read_timeout 300;
keepalive_timeout 70;
proxy_read_timeout 1200s;
include /etc/nginx/uwsgi_params;
include /etc/nginx/proxy_params;
}
}

29
_deploy/uwsgi.ini Normal file
View File

@ -0,0 +1,29 @@
[uwsgi]
uid = app
gid = app
# Django-related settings
# the base directory (full path)
chdir = /var/www/phzhik-poizonstore/
# Django's wsgi file
module = vba_portal:application
# the virtualenv (full path)
;virtualenv = /var/www/phzhik-poizonstore/env
# process-related settings
# master
master = true
# maximum number of worker processes
processes = 10
# the socket (use the full path to be safe
#socket = /var/www/phzhik-poizonstore/mysite.sock
socket = :8001
wsgi-file = /var/www/phzhik-poizonstore/vba_portal/wsgi.py
pidfile = /tmp/uwsgi.pid
# ... with appropriate permissions - may be needed
chmod-socket = 664
# clear environment on exit
vacuum = true
env = LANG=C.UTF-8
enable-threads = true