• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Django deployment

Django deployment

Installing in production doesn't need to be hard

  • Home
  • Blog
  • About

Webinar: Deploying Django—from zero to production in 20 minutes

2019-03-13

I held this webinar two years ago—28 February 2017.

We start from zero: no server, no DNS, only a Django project in development. In 20 minutes we have a Ubuntu server running our Django project with nginx, Gunicorn and SQLite. Even if you only know Windows, you will get a good feeling of these technologies and understand why deploying on GNU/Linux is usually the most cost-effective solution. We have some fun making requests altogether in order to see whether the server can take it, and we also see whether SQLite is up to the task. Less than 30 minutes of presentation and lots of Q&A (total duration one hour).

These are questions that were asked and the times in the video in which I answer.

Different settings for development and production environment
27m30s

Managing passwords and secret keys

31m35

Is /etc/opt a standard? I have seen other locations like /usr/local/etc

36m00s

The FHS isn’t entirely clear. It says you can put third-party applications
in /usr/local or /opt or /srv. If you choose to put everything (program
files, data files, configuration files etc.) under a single directory it
should be /srv. My impression from common practices and from discussing it is that /usr/local is for replacement of system components (e.g. another Python) that would otherwise go to /usr. This leaves /opt, but the distinction is fuzzy. The FHS is clear that configuration for programs in /opt goes in /etc/opt and data files in /var/opt.

Deployment using fabric or any other python packages

37m8s

Using CDN for serving static(AWS etc.)

44m52s

Why use supervisor and crontab with nginx and gunicorn?

54m18s

What is the difference between a non-system user and a system user?

(60m33s) System users are intended to run programs, whereas normal users are people. Because of the –system parameter, adduser will assign a user id less than 1000, which is only a convention for knowing that this is a system user. Otherwise there isn’t much difference

Use nginx instead of apache?

(60m51s) See Why nginx is faster than apache, and why you needn’t necessarily care

What are you thoughts on using a network port vs unix sockets?

61m00s

Previous Post: « Demystifying encodings — part 3

Primary Sidebar

Copyright © 2025 · Genesis Sample on Genesis Framework · WordPress · Log in