A detailed yet simplified explanation (beginner-friendly) on Deploying a NodeJS Application (REST API) on a real server with Docker (GCP - Google Cloud Platform).
00:00 Intro
04:29 Dockerizing(Dockerfile)
13:24 Dockerizing(docker-compose.yml)
22:50 Migration Docker Service
26:36 Start setting up GCP Server
30:25 Create SSH Keys and Connection
37:15 Install GIT and Docker on the GCP server
40:25 Clone the project on to the GCP server
44:03 Add a firewall rule to open a port for the application to run
48:15 Outro
This guide has three main steps:
01. Dockerizing the Application
02. Setting up a GCP VM (Google Cloud Platform Server)
03. Push the code to the GCP Server using GIT
We start by Dockerizing our entire application. We use 3 Docker containers for this:
- Database Docker Container
- Application Docker Container
- Migrations Docker Container
Migrations Docker Container is for auto-creating tables for the first time. That makes our lives so much easier since we don't have to manually run migrations or create tables.
Once the Dockerization is complete, we setup a Virtual machine on GCP. And we use Puttygen and Putty to create an SSH Key to login to the server.
Then we clone the project using GIT. We don't have to install many dependencies on the server since we're using Docker. So, we just need to install the Docker engine on the server. After that, we just need to add a Firewall Rule to our VM on GCP so that the application can be accessed using the external IP of your server.
This covers everything you need to know about Deploying a NodeJS REST API to a real server.
Clone the project:
[ Ссылка ]
Introduction - Create REST API with NodeJS and MySQL
[ Ссылка ]
How to Dockerize NodeJS application with MongoDB
[ Ссылка ]
Install Docker on Ubuntu Server:
[ Ссылка ]
What Programming Languages you should learn in 2024 as a Web Developer
[ Ссылка ]
#coderawesome #nodejstutorial #restapi #docker #googlecloud
Hit Subscribe and smash the Like button.
Become a Patreon and support me!
[ Ссылка ]
Visit my blog: [ Ссылка ]
Follow me on Tiktok: [ Ссылка ]
Follow me on Instagram : [ Ссылка ]
Follow me on Facebook : [ Ссылка ]
Follow me on Twitter : [ Ссылка ]
Ещё видео!