Thi is a Next.js Web App Quickstart for Nullstone.
This is based off the official Next.js Getting Started guide.
This is bootstrapped with create-next-app
.
This quickstart is set up with:
- Next.js
- Create a static site. (Remember
app-name
for later) - Add a subdomain. (this will add a CDN capability)
- Provision
nullstone up --wait --block=<app-name> --env=<env-name>
- Build, push, and deploy
docker build -t nextjs .
nullstone launch --source=nextjs --app=<app-name> --env=<env-name>
You can run this project locally inside Docker or using a dev server. The docker setup is configured to hot reload; you don't have to rebuild/restart the container when you change code.
docker compose up
Visit http://localhost:3000.
yarn dev
Visit http://localhost:3000.
The app
in docker-compose.yml
is configured to automatically reload changes to code.
You do not need to rebuild/restart the app when making changes to code.
To make changes to dependencies, make changes to package.json
and restart your docker container.
yarn install
happens automatically at the boot of the docker container to update dependencies.
docker compose restart app
This static site was generated following these steps.
yarn create next-app --typescript