Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Dockerize Next.js 16 and Deploy to VPS - Custom Domain, SSL, CDN Cloudflare, Docker Compose

ByteGrad via YouTube

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn to containerize and deploy Next.js 16 applications to a Virtual Private Server with complete production setup including custom domains, SSL certificates, and CDN integration through Cloudflare. Master two deployment approaches: building Docker images locally and pushing to a container registry, or using Docker Compose with automated deployment through Docker Manager. Create essential Docker configuration files including Dockerfile and .dockerignore, then build and run containers using Docker Desktop and terminal commands. Set up a VPS environment, establish SSH connections, and pull Docker images from GitHub Container Registry. Configure Docker Compose files for streamlined deployment workflows and integrate with GitHub repositories for automated builds. Implement custom domain configuration, secure HTTPS connections with SSL/TLS certificates, and configure Traefik reverse proxy for advanced routing. Optimize application performance by setting up Cloudflare CDN for global content delivery and enhanced security features.

Syllabus

00:00 Intro
01:15 Next.js app example
02:04 2 options for deploying Docker app
02:54 Option 1 - Build Docker image locally
03:19 Dockerfile and .dockerignore
04:46 Docker Desktop
05:25 docker build terminal command
07:23 Run container
08:12 Push to registry ghcr.io
10:09 VPS Hostinger
12:34 ssh & pull image
14:51 Run container on VPS
15:55 App demo on VPS
16:40 Option 2 - Reset for Docker Manager
17:41 Docker Compose docker-compose.yml
19:55 Push to GitHub
20:19 Deploy with docker-compose.yml & Docker Manager
22:04 Private repo
22:09 Custom domain
24:25 HTTPS / SSL
24:59 Traefik reverse proxy
26:04 CDN with Cloudflare

Taught by

ByteGrad

Reviews

Start your review of Dockerize Next.js 16 and Deploy to VPS - Custom Domain, SSL, CDN Cloudflare, Docker Compose

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.