Looking for help deploying with Django
3 12 Jul 2016 17:13 by u/Nokilter
Preface: I'm simple looking for help with this matter, I am not looking for alternatives I've spent too much time and effort to switch languages or frameworks although I would consider a different deployment method if a better one is shown.
I'm currently working toward deploying a Django 1.8 project with Gunicorn, Virtualenv, and Nginx set as a reverse proxy on a standard Ubuntu server LTS 14.04; it should be said also I have been attempting to launch these from a directory at root which I Virtualenv in. So far I have been able to get my project to launch locally with Gunicorn from a local server pc I built but haven't been able to configure Nginx to get it to communicate to the outside. I use a dd-wrt router to ddns to my domain provider which seems to configured properly from their guides. The real problem for me lays in finding a guide or more detailed information as to how to configure a sites-available file for Nginx and then have it talk with Gunicorn. For example, [This](https://arjoonn.blogspot.com/2015/05/django-gunicorn-and-nginx.html) is the most recent/relevant guide I've found on this topic yet he left many things assumed which are beyond me. If you could answer the following questions from that guide it would help me immensely:
* At the top of the given Nginx example code he's pointing the project at a file or directory called “gunicorn_socketâ€. I've seen these before in other guides but I have a lot of errors given when I try to create one and debug with Gunicorn screams at me this deprecated, so any hints or clarification would be a great help.
* Does “server_name†need to match what I am launching my Gunicorn as?
* I've configured Django in such a way that the static files folder is already pointed to from the settings.py. Should I point Nginx toward the static folder also with “root /path/to/your/app/media�
Bonus questions:
* Which Gunicorn configuration should I run since I own a domain?
gunicorn -w 4 -b example.com project.wsgi
gunicorn -w 4 -b project.wsgi
0 comments
No comments archived.