Triển khai Ứng dụng MERN Stack trên AWS EC2 bằng GitHub Actions & Thiết lập SSL

Tác giả: Integrations Ninjas
Ngày xuất bản: 2025-04-28T00:00:00
Length: 42:29

Tóm tắt nội dung

Mô tả

In this video, I will walk you through deploying a MERN (MongoDB, Express, React, Node.js) stack application on AWS EC2 with the power of GitHub Actions for continuous integration and delivery (CI/CD). I will also guide you through the process of setting up SSL certificates to ensure secure, encrypted communication over HTTPS.

Read the full article here: https://medium.com/@integrationninjas/deploy-mern-stack-on-aws-ec2-with-github-actions-ssl-setup-fc4702b76055

Timestamps:

0:00 - Introduction

0:39 - Application architecture

1:26 - Node.js app deployment workflow

2:23 - React app deployment workflow

3:00 - Setting up AWS EC2 instance

5:07 - Installing docker on AWS EC2

6:25 - Setting up self-hosted runner on AWS EC2 for Node.js project

9:12 - Configuring self-hosted runner application as a service

11:12 - MongoDB Setup

13:42 - Storing MongoDB password in GitHub secrets

14:15 - Docker Hub Setup

15:16 - Creating Dockerfile for Node.js application

16:12 - Creating GitHub workflow file for Node.js application

22:00 - Triggering workflow for AWS EC2 deployment

27:48 - Verify Node.js deployment

28:12 - Creating Dockerfile for React application

30:52 - Creating GitHub workflow file for React application

34:00 - Triggering workflow for AWS EC2 deployment

34:39 - Domain Configuration

36:20 - Configure Nginx & SSL

40:58 - Testing complete MERN application

Please find below reference code and pipeline:

NodeJS App Code Reference: https://github.com/integrationninjas/nodejs-app/tree/mern-ec2-docker-ssl

NodeJS App Pipeline: https://github.com/integrationninjas/nodejs-app/actions/runs/14695028506

React Code Reference: https://github.com/integrationninjas/reactjs-app/tree/mern-ec2-docker-ssl

React App Pipeline: https://github.com/integrationninjas/reactjs-app/actions/runs/14695094074

Use below command to install Docker on AWS EC2:

sudo apt-get update && sudo apt-get install docker.io -y && sudo systemctl start docker && sudo chmod 666 /var/run/docker.sock && sudo systemctl enable docker && docker --version

Use below command to install Nginx and Certbot

- sudo apt update && sudo apt install nginx -y && sudo systemctl start nginx && sudo systemctl enable nginx

- sudo apt install certbot python3-certbot-nginx -y

#github #githubactions #githubtutorial #aws #awsec2 #mernstack #deployment #cicd #devops #devopstutorial #mongodb #expressjs #reactjs #nodejs #expressjs #sslcertificate #https

Dịch Vào Lúc: 2025-07-17T07:22:11Z

Yêu cầu dịch (Một bản dịch khoảng 5 phút)

Phiên bản 3 (ổn định)

Tối ưu hóa cho một người nói. Phù hợp cho video chia sẻ kiến thức hoặc giảng dạy.

Video Đề Xuất