Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Deploy Django on Linux
Rating: 4.8 out of 5(146 ratings)
556 students

Deploy Django on Linux

Deploy like a pro
Created byJohn Leon
Last updated 3/2021
English

What you'll learn

  • How to deploy Django to a secure production environment
  • Understand the architecture of a Django deployment
  • What options are available in the tech stack (Linux, Web server, WSGI, Database, SSL)
  • How to configure PostgreSQL database
  • How to configure gunicorn WSGI server
  • How to configure Nginx web server
  • How to configure SSL with free LetsEncrypt certificates or self-signed certificates
  • How to update and backup your deployment
  • How to setup a protected development site

Course content

5 sections29 lectures2h 26m total length
  • Introduction to Architecture1:42

    Quick overview about what you will learn in this section of the course:

    • Simplest architecture

    • Complex architecture

    • Components involved

    • Component options

    • My recommendations

  • The Physical Machine3:26

    You will need a computer to install Linux on. In this lecture I will explain some of your options for development and production environments. Check the downloadable materials for this lecture to get a link worth $100 of credit on Digital Ocean which you can use to rent a virtual machine and follow along with the rest of the course.

  • The Linux Operating System3:36

    Since we are deploying to Linux, you'll need a GNU/Linux machine. What you learn in this course will apply to almost any Linux distribution with minimal changes. In this lecture I will discuss some of the Linux distributions that I would recommend and some of the pros and cons of each.

  • Which Linux Distro Will we use?
  • The WSGI Server7:10

    In this lecture I will explain what the WSGI server is and it's role. We'll also look at  what options are available for WSGI servers and which ones I recommend.

  • WSGI Quiz
  • The Web Server3:47

    Learn about the web server's role in a Django deployment and what options are available.

  • Web server quiz
  • The Database4:10

    Learn where the database fits into the architecture and what database options are available. I will also give my recommendations.

  • Database quiz
  • Complete Architecture Recap2:14

    Let's recap everything we've talked about in this architecture section and go over the important pieces you should understand at this point.

  • Architecture quiz
  • Alternative Architectures4:01

    Rather than running all the components on a single machine, it is possible to separate the components and architect the solution in a variety of ways. I will illustrate different variations of the architecture and explain why you might choose each variation depending on where you need to scale your project.

Requirements

  • Basic Python experience
  • Basic Django experience
  • Basic Linux experience

Description

I will walk you through all the major components of deploying Django.

Learn about the architecture of a deployment and how the different pieces fit together. You will understand the differences and similarities between different options for:

  • Linux distribution (Debian vs Ubuntu vs CentOS vs Fedora)

  • Web server (Nginx vs Apache2)

  • Database server (SQLite vs MySQL vs MariaDB vs PostgreSQL)

  • WSGI server (uWSGI vs gunicorn vs waitress)

  • SSL certificates (self-signed vs LetsEncrypt)

The first portion of the course will talk about the architecture and the role of each component. I will also discuss alternative architectures and things to consider when planning. I'll talk about the different options and which ones I recommend for various situations. The second portion of the course will be an actual walkthrough, step-by-step, of deploying a Django project to production with security in mind. At the end of the course I'll wrap up with showing you how you can automate updates and backups.

When you're done with the course you'll know all my tips and tricks, have a solid understanding of the architecture to make well informed choices.

You can ask me questions in the Q&A section of the course and learn from others. If you have a unique situation, share your question and I will help you. Remember, you're not just buying a set of videos, you're taking a course and I am a resource for you as your instructor.

Students should already have proficient Linux and Python skills with some familiarity with Django.

Who this course is for:

  • Python or Django developers
  • Devops engineers working with Django, Flask, or other WSGI web apps
  • Linux system administrators working with Django, Flask, or other WSGI web apps
  • Security Engineers who work with Python web apps
  • Anyone curious how a Django application is deployed