Skip to content

DefangSamples/sample-nextjs-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Next.js

1-click-deploy

A basic Next.js app with a Dockerfile and compose.yaml ready to deploy to AWS with Defang.

Steps

  1. Install Defang
  2. Authenticate with Defang
  3. (optional) Authenticate with AWS
  4. Run defang compose up in the root of this project

Static Files (Experimental)

This example supports deployment to AWS as a static site. Static files will be copied to an S3 bucket. In the affordable deployment mode (the default), the static files will be served over HTTP from an S3 bucket.

:::info Note that some top-level domains (TLDs), such as .app, require HSTS, which will disallow browsers from accessing the site over HTTP. If you want to use such a TLD, you must serve the static files over HTTPS by using either the balanced or high_availability deployment mode. :::

To serve the static files over HTTPS, use either the balanced or high_availability deployment mode, which will create a CloudFront distribution in front of the S3 bucket.

To deploy this project as a static site, run:

defang compose up -f compose.static.yaml --provider=aws --mode=balanced

Title: Next.js

Short Description: A basic Next.js app.

Tags: Next.js, React, Docker, Node.js, TypeScript, JavaScript, Static

Languages: nodejs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 8