Skip to content

Instantly share code, notes, and snippets.

View itseasy21's full-sized avatar
🏠
Working from home

Shubham Mathur itseasy21

🏠
Working from home
View GitHub Profile
@itseasy21
itseasy21 / gist.md
Created June 26, 2022 05:01 — forked from ArcRanges/gist.md
aws-ec2-nextjs

Instructions to properly set up a production-ready NextJS App with AWS

This is a summary of how to start your own NextJS app, create the repo on Github, upload later in an AWS EC2 Instance and automate the process with AWS Codebuild, CodeDeploy, & CodePipeline.

After following these instructions you should be able to:

  • Create a NextJS App
  • Create an AWS EC2 instance
  • Be able to SSH to an EC2 instance
  • Prepare the instance as a Node environment
  • Configure Nginx service for proper routing
  • Configure domain and add SSL
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
# eth0 may or may not be present, please check before making any changes
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet