How to Deploy a Full-Stack App on Ubuntu (Django + React)
Learn how to deploy a full-stack Django and React application on an Ubuntu server, from initial server setup to a production-ready deployment. In this complete guide, we’ll configure PostgreSQL, Gunicorn, systemd, Nginx, a custom domain, and HTTPS with Let’s Encrypt. I’ll also show you how to deploy updates and troubleshoot common deployment errors. Technologies covered: Django, React, PostgreSQL, Gunicorn, Nginx, Ubuntu, DigitalOcean, and Let’s Encrypt. Backend Deployment Guide: https://github.com/CodeWithClinton/deploy-django-ubuntu Frontend Deployment Guide: https://github.com/CodeWithClinton/deploy-static-react-spa-ubuntu Table of Contents: 00:00:00 – Introduction 00:01:48 – Creating a DigitalOcean Droplet and SSH Key 00:07:00 – Initial Ubuntu Server Setup 00:13:52 – Installing and Configuring PostgreSQL 00:17:13 – Deploying the Django Backend 00:25:47 – Configuring Gunicorn with systemd 00:34:20 – Pointing the Domain Name to the Server 00:35:44 – Configuring Nginx for the Django Backend 00:43:28 – Adding HTTPS to the Backend Domain 00:47:36 – Deploying Backend Updates 00:48:58 – Deploying the React Frontend 00:57:19 – Configuring Nginx to Serve the React Frontend 01:03:05 – Adding HTTPS to the Frontend Domain 01:04:51 – Troubleshooting Frontend Deployment Errors 01:06:06 – Testing the Live Application 01:06:56 – Deploying Frontend Updates 01:08:05 – Final Thoughts 01:08:17 – End Screen