filmov
tv
Django Deployment: How to deploy Django app to server using Nginx + Uvicorn | Django deploy tutorial
Показать описание
In this Django Deployment Tutorial I use an Ubuntu Server 20.04 that is running an a Virtual Machine instead of VPS, but actually it doesn't matter, because it's the same Ubuntu.
To deploy Django project on server I used Supervisor - the process manager, that is responsible for starting and restarting of the Django project.
Also with Django I used Uvicorn instead of GUnicorn. Uvicorn is the WSGI (ASGI) interface between the Nginx and Django. I didn't use GUnicorn here because Django 3 is asynchronous framework, and as for now it's a bit tricky to use the Gunicorn with it. So I use Uvicorn for Django.
And it's idea is to show that the video about Integration is a working way of doing things.
Follow me @:
Links:
Gist with commands to deploy Django project to a server:
Timecodes:
01:06 - What you need from VPS provider to deploy Django via SSH
02:39 - Creating a Django project, virtual environment
04:54 - Creating Django templates, static folders
06:03 - Creating Django base, index templates
[ Prepare Django for deployment]
13:37 - Deploy Django preparation
14:08 - Installing python-dotenv, psycopg2
16:43 - STATIC_ROOT, STATICFILES_DIRS
19:00 - Git repository initialization
[ Server Configuration ]
21:06 - Server configuration beginning
25:14 - Installing system packages
26:09 - PostgreSQL configuration
29:14 - Cloning Django project on server
29:47 - Creating a virtual environment, Installing Django dependencies
33:47 - collectstatic
34:20 - Installing Uvicorn, and checking connection to Django
36:34 - Supervisor configuration
41:22 - Nginx configuration
45:22 - Set ALLOWED_HOSTS
45:50 - Fixing the Nginx paths
➥➥➥ SUBSCRIBE FOR MORE VIDEOS ➥➥➥
Red Eyed Coder Club is the best place to learn Python programming and Django:
Django Deployment: How to deploy Django app on server using Nginx + Uvicorn | Django deploy tutorial:
This video is about how to deploy Django project on server.
#deploydjango #djangodeployment #deploydjangoonserver #django #redeyedcoderclub
Комментарии