How do I move Django project from my local machine to Linode Debian server?
I'm trying to figure out how to successfully move my Django project from my local machine to Linode.
On my local machine, I enter a virtual environment, run
python manage.py runserver, then navigate my browser to
localhost:8080 to see my project. It works fine there. What must I do to set this up on my Linode instance so that I can navigate to the Linode address to view it successfully? For example, how do I set things up so I can navigate my browser to
Django's website also has some good guides for putting your app into production:
Essentially, you're going to have to set up a web server like Apache and Nginx. You'll also set up an application server like uWSGI or Gunicorn to run your Django app. Then, you'll set Apache or Nginx to proxy requests for the app to uWSGI or Gunicorn.
I've managed to get through this portion of the process, using gunicorn
and Ubuntu 18.04LTS instead of uwsgi and 14.04. But what is the best way to move my perfectly working django web app from my personal computer to my Linode VPS? I can easily copy the entire project folder from my personal computer to someplace logical on my Linode VPS, but then what? In particular, how do I configure gUnicorn / nginx to redirect some IP/folder to my new project's service?
I haven't personally done this, so I hope you don't mind if I chime in here. You may have come across this already but if not I wanted to pass along this guide from Django on hosting a site on Linode:
It looks like this covers some of the basics for setting up Django. Though since this uses Apache instead of Nginx you may need to improvise a little.
I can easily copy the entire project folder from my personal computer to someplace logical on my Linode VPS, but then what? In particular, how do I configure gUnicorn / nginx to redirect some IP/folder to my new project's service?
This would need to be configured in your
The below is a general guide which provides a helpful overview regarding configuring this file to host your site:
For more specifics on configuring Nginx I wanted to include these two guides as well:
While it's some generalized information, hopefully it helps give you something to work with!
Best of luck.