Posts by DavidChatelain (6)

Deploying a Django Project, Part 6: SSL/TLS Certificate and Continuing Development

In Part 5 of this tutorial series, we launched our Django project on the web with our custom domain name. Our site is technically deployed and accessible to anyone in the world, but we would be lax in our duties as web developers if we did not secure our site's traffic. Currently, if you look at your site in a web browser, you will notice that it does not have a little padlock icon next to the URL, and the URL will begin with http:// rather than https://. Most sites these days are encrypted using transport layer security, or TLS. These sites have SSL/TLS certificates certifying …

Continue reading

Deploying a Django Project, Part 5: Launch Your Project with Gunicorn and NGINX

If you have been following along with this tutorial series, you now have your Django project set up and ready to launch on your Droplet on Digital Ocean. Your project can communicate with your PostgreSQL database, and your project settings are fully configured for launch on your custom domain. In Part 5, we will launch your web application using Gunicorn to handle multiple instances of Django, and we will use NGINX to manage HTTP requests and serve static files. By the end of this tutorial, your project will be live on your custom domain!


Test the Project with Gunicorn

In Continue reading

Deploying a Django Project, Part 4: Clone Your Project onto the Server

In Parts 1-3 of this tutorial series, we set up a custom domain name for our web application, we began to set up our Ubuntu server using a Digital Ocean Droplet, and we created a PostgreSQL database which can communicate with Django. In Part 4, we will continue setting up our server and clone our project onto it.


Creating a Virtual Environment on the Server

Much like on your local development environment, it is best practice to set up your Django project on a virtual environment on your Ubuntu server. First, we need to upgrade pip, and then we …

Continue reading

Deploying a Django Project, Part 3: Configuring Project Settings and Creating a PostgreSQL Database

If you have been following along with this tutorial series, you should now have a server, or Droplet on Digital Ocean, with an admin-level user and basic requirements installed. In Part 3, we will continue by configuring some project settings on our local system and using the python-decouple library to save our sensitive information in an environment file. We will also log back in to our server and create a PostgreSQL database to handle our project data.


Configuring Django Project Settings

Before continuing the deployment process on our production server, now is a good time to make some necessary changes to …

Continue reading

Deploying a Django Project, Part 2: Setting Up the Server

In Part 2 of this tutorial series, we will continue to deploy our Django project to Digital Ocean using an Ubuntu server. In this part, we will log in to our server and begin configuring it, setting up an admin-level user, and installing some basic dependencies. If you are following along with this tutorial, you should already have created a Droplet on Digital Ocean and set up an SSH key to access it. If not, see Part 1 to learn how to create a Droplet.


Log In to the Server and Create Admin-Level User

In order to log in …

Continue reading

1 2 Next Last