diff --git a/.env b/.env new file mode 100644 index 0000000..1a1ae72 --- /dev/null +++ b/.env @@ -0,0 +1 @@ +APP_HOME=/var/www/phzhik-poizonstore/ \ No newline at end of file diff --git a/_deploy/nginx.conf b/_deploy/nginx.conf new file mode 100644 index 0000000..dc90c09 --- /dev/null +++ b/_deploy/nginx.conf @@ -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; + } +} \ No newline at end of file diff --git a/_deploy/uwsgi.ini b/_deploy/uwsgi.ini new file mode 100644 index 0000000..409f0b5 --- /dev/null +++ b/_deploy/uwsgi.ini @@ -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 \ No newline at end of file