Skip to content

ebox86/nextjs-aws-terraform-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nextjs-aws-terraform-starter

nextjs starter using terraform on aws

Project Structure

nextjs-aws-terraform-starter/
│
├── nextjs-app/                # Next.js application source code
│   ├── src/
│   │   └── app/               # App router directory for Next.js - where index page lives
│   │       └── api/           # Api router directory for Next.js
│   │           └── health/    # Health check lives here
│   ├── package.json           # Node.js dependencies and scripts
│   └── Dockerfile             # Dockerfile for building your Next.js app
│
├── terraform/                 # Terraform configuration files
│   ├── main.tf                # Main Terraform configuration
│   ├── variables.tf           # Terraform variables
│   └── outputs.tf             # Terraform outputs
│
├── scripts/                   # Utility and deployment scripts
│   ├── deploy.sh              # Script for building and deploying the app
│   └── teardown.sh            # Script for tearing down all components 
│
├── .gitignore                 # Git ignore file
└── README.md                  # Project README

Setup

navigate to /scripts and run ./deploy.sh script.

to destroy environment, run ./teardown.sh script.

Notes

  • this assumes the use of default VPC and creates 2 new subnets: 172.31.101.0/24 and 172.31.102.0/24. More on default VPC's here.
  • the ECR repo is created with force_delete=true, disable this for production deployments.

About

nextjs starter using terraform on aws

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published