
Deploy Node.js App on VPS Using Docker | Full Tutorial (Dockerfile + Docker Compose)
In this complete tutorial, we build a simple Node.js Express application and deploy it to a VPS using Docker.
📌 Click here to Buy India Best Hosting 👉 https://www.hostg.xyz/SHGZy
💥 Use the discount code THAPA20 to get Extra 20% OFF!
-------------------------------------------------
You will learn how to containerize a Node.js application by creating a Dockerfile, building a Docker image, and running it using Docker Compose. After that, we push the code to GitHub, clone it on a VPS, and run the application directly from the server.
This video covers the entire deployment workflow from local development → Docker image → Docker Compose → GitHub → VPS deployment.
By the end of this tutorial, your Node.js application will be running live on a VPS using Docker.
In the final section, I also discuss two important topics:
How to connect a domain name to your VPS
How to automate deployment using GitHub Actions (CI/CD)
If you want to see those topics in the next video, make sure to comment below.
⌛TIMELINE⌛
0:00 Deploy Node.js App on VPS Using Docker
0:30 Video Overview & Timeline
0:40 Creating Project Folder
1:10 Important Setup Guidelines
2:05 Creating package.json
2:25 Installing Express & EJS Dependencies
2:55 Adding Application Code
4:00 Running the Express App Locally
4:40 Understanding the Project Structure
5:18 Why We Need Docker
8:20 Installing Docker
9:15 Preparing Folder Structure for Docker
9:30 Steps to Create a Docker Image
21:05 Running the Docker Image
24:05 Understanding Docker Compose
28:30 Running Docker Compose
30:50 Connecting the Project to GitHub
32:00 Pushing Code to GitHub
33:05 Introduction to VPS
34:15 Accessing VPS Terminal
34:15 Cloning Git Repository in VPS
35:00 Running Docker Compose on VPS
36:50 Two Important Questions Developers Have
39:05 Comment for Next Video (Domain + GitHub Actions CI/CD)
