Skip to content

Latest commit

 

History

History
39 lines (24 loc) · 1.7 KB

File metadata and controls

39 lines (24 loc) · 1.7 KB

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