I am serving a Django App on Linux - what now?

Posted October 5, 2021 94 views
PythonDjangoDevelopmentProgramming ProjectUbuntu 20.04

Hey! I followed the full and amazing series of articles by Mitchell Anicas, Brian Boucheron, Jeremy Morris, Lisa Tagliaferri:

  1. An Introduction to the Linux Terminal
  2. Initial Server Setup with Ubuntu 20.04
  3. How To Install Python 3 and Set Up a Programming Environment on an 4. Ubuntu 20.04 Server
  4. How To Create a Django App and Connect it to a Database
  5. How To Create Django Models
  6. How to Enable and Connect the Django Admin Interface
  7. How To Create Views for Django Web Development

That helped me learn how to deploy a Django app to a Linux droplet. I got through without a hitch, which is very rare and testifies to excellent articles.

My question is, what now? In article #5, Morris mentions that:

“Note that this will provide you with a development environment in which to work on your blog web app, but you will need to take more steps before you put your blog live on the internet, and will need to set up domain names, and add additional layers of security.”

Do you have any articles about best practices for deploying a web site? For example, my serve command of course cancels whenever I close my SSH connection, and I want it to run continuously - that’s the whole point of a VPS. I also probably should change my Django app’s DEBUG variable to false, and there are probably other things I should know. These Digital ocean writers have already provided me with a lot of great information, but I was hoping that there was more out there for me to continue learning.

Thanks a ton for your time.



These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi there,

Really happy to hear that those tutorials were helpful!

Yes, you can follow the steps here on how to deploy Django with Gunicorn and Nginx:

That way when you close your SSH session, the service would still be up and running on the server.

Hope that this helps!

by Justin Ellingwood
Django is a powerful web framework that can help you get your Python application or website off the ground. Django includes a simplified development server for testing your code locally, but for anything even slightly production related, a more secure and powerful web server...