This proposes updates based on New Cloud Services that are supporting Next.js.
1. Cloudflare Pages and Firebase are not Static Only Anymore so moved them to respective sections
2. Added AWS Amplify
**Please merge this open source contribution if this seems valid to you. 🙏**
## Documentation / Examples
- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
It seems that setting `NEXT_MANUAL_SIG_HANDLE` in `.env` file is not working, so I added some notes.
## Documentation / Examples
- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
Update to reflect the latest addition of Hybrid (Static + SSR) Next.js support in Azure Static Web Apps. For more information kindly refer to https://aka.ms/swanextjsssr
## Bug
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`
## Feature
- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`
## Documentation / Examples
- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
This PR adds new information to the Next.js deployment documentation to highlight examples or guides for deploying Next.js to a handful of services. This builds on the existing documentation around the Next.js Build API (from `next build`) and options for self-hosting with Node.js or Docker.
## Feature
- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`
## Documentation / Examples
- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
## Bug
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
## Feature
- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [x] Related issues linked using [19693](https://github.com/vercel/next.js/discussions/19693)
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`
## Documentation / Examples
- [ x] Make sure the linting passes by running `yarn lint`
Closes#29959
We made the images expand to fit the full width of the container, but the deploy button image shouldn't be that large. Also made some slight refactors here to improve on my past documentation changes.
Building off https://github.com/vercel/next.js/pull/31465 for `next export` docs.
- Clearly explains the standard output from `next build`
- Move Dockerfile snippet to example, instead of embedded directly
- Clarify both Vercel and `next start` use the Build API output spec
- Less emphasis on recommending Vercel (more neutrality)
- Mention Middleware & Edge Functions when discussing Vercel
- Add "Going to Production" link at the bottom for related reading
It's fairly opaque to the user that there are problems with `sharp` in an out-of-the-box Linux environment, and so if `sharp` is going to be explicitly recommended for non-Vercel production environments then I think it's a good idea to make sure people are aware of the possible issues.
My vanilla Heroku deployment was using wild amounts of memory until I found the details in the sharp docs about how to configure the memory allocator, so signposting this a bit better should help prevent issues in future.
## Bug
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
## Feature
- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`
## Documentation / Examples
- [ ] Make sure the linting passes by running `yarn lint`
Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
Fixes#29023
## Bug
- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`
## Feature
- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`
## Documentation / Examples
- [x] Make sure the linting passes
I also removed the custom server link here, because I think it's making too strong of a correlation between custom server and Node.js server using `next start`, which aren't the same.
added the following line, to remove the size of the `runner` (production) image. This will remove the `devDependencies` from the container after `next build` completes.
```
yarn install --production --ignore-scripts --prefer-offline
```
For the typescript starter, this is the change in size
| before <br/>proposed change<br/>size in bytes | after <br/> proposed change <br/> size in bytes|
|----|---|
| 347MB | 176MB |
## Feature
- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
## Documentation / Examples
- [x] Make sure the linting passes
After testing the new docker deployment documentation, ran into the following error when running the container if you're using `next/image`:
```
[Error: EACCES: permission denied, unlink '/app/.next/cache/images/2+fKe4RlpMaSTNc8npKwiCItZgik9aOX9qkxnVSrsUo=/1613616499089.3hEMhfux5+SolMDEVHEaVPK2O0OlcLoYNao0yKpmYeg=.webp'] {
errno: -13,
code: 'EACCES',
syscall: 'unlink',
path: '/app/.next/cache/images/2+fKe4RlpMaSTNc8npKwiCItZgik9aOX9qkxnVSrsUo=/1613616499089.3hEMhfux5+SolMDEVHEaVPK2O0OlcLoYNao0yKpmYeg=.webp'
}
```
This change gives the user correct ownership to have the correct permissions.
Update docker file example in deploy documentation to use correct working directory in builder stage. It will fail to copy files from that stage since it's attempting to copy files that don't exist.
Add a Docker Image section into the Deployment Documentation with an example and how to build and run it.
The example is a multi-stage docker image with node modules layer caching for faster builds in development and a result image just with the node_modules and build code needed to run the application within a custom user with restricted access.
The example contains a commented piece of code on how to disable telemetry as well.
This is useful for folks that are deploying to container orchestrators like ECS, Kubernetes (GKE, EKS, AKS) or Hashicorp Nomad, as well as just running a docker container in a single node in some cloud provider.
Changed reference from 'master' to 'main' branch under DPS section in line with GitHub's recent switch from master to main branch as base repo branch names.
- Mention React Fast Refresh instead of hot reloading in docs
- Added a mention of our deployment docs in the main documentation page
- replaced `npm init` with `npx`
* Added descriptions
* Added descriptions to API Reference
* Added descriptions to API Routes
* Added descriptions to basic features
* Added descriptions to the routing docs
* Update exportPathMap.md
Co-authored-by: Joe Haddad <timer150@gmail.com>
* Added the docs from Notion
* Updated the links from notion to relative links
* Added a routes manifest to the docs
* Removed the <br> after examples toggle
* Use the name of the section instead of Introduction
* Fixed spelling errors
* Optimize the content for Algolia
* Add a paragraph for `pageProps`
* Add welcome section
* Transpile -> Compile
* Update getting-started.md
* Update getting-started.md
* Update getting-started.md
* Update getting-started.md
* Update getting-started.md
* Update getting-started.md
* Update getting-started.md
* Update getting-started.md
* Update getting-started.md
* Update getting-started.md
* Test extra room between
* Update getting-started.md
* Update getting-started.md
* Update getting-started.md
* Update getting-started.md
* Update getting-started.md
* Update manifest.json
* Update getting-started.md
* Update getting-started.md
* Add concepts section
* Update pages.md
* Update pages.md
* Add data fetching section
* Update pages.md
* See how a card looks like
* Undo card changes
* Added related section to getting-started
* Fixed wrong markdown syntax in the withRouter page
* Moved the server-side-and-client-side section
* Updated next-cli reference
* updated getInitialProps section
* Minor fixes
* Added more Related sections
* Add html to the related section in getting-started
* Use small for the card
* Use cards for all related sections
* Added src directory docs
* Added src directory to the manifest
* Add note about API routes in next export
* Add initial data fetching docs (private until new methods are released)
* Fix typos
* Improve wording
* Update getting-started.md
* Update getting-started.md
* Move advanced concepts to advanced section
* Hide server-side vs client-side
* Move AMP support
* Move typescript into one page
* Add routing concepts page
* Remove introduction page
* Update section on different route types
* Update routing.md
* Update routing.md
* Update routing.md
* Update routing.md
* Combine router injection pages
* Update pages.md
* Update routing.md
* Update using-link.md
* Update using-link.md
* Update typescript.md
* Move the API Routes typescript to basic features
* Added links to the typescript section
* Updated links to useRouter and withRouter
* Add singleLevel prop to manifest
* Added single page for router docs
* Updated description
* Updated the routes in the manifest
* Add data fetching section
* Update data-fetching.md
* Update data-fetching.md
* Update dynamic-routes.md
* Update manifest.json
* Only use the single router API page
* Moved the concepts pages
* Updated links
* Removed extra space
* Updated title for Router API
* Added a description with frontmatter
* Add open prop to the manifest
* Added datafetching section to API Reference
* Updated links to the getInitialProps reference
* Moved some sections to API
* Added next/head to API reference
* Added next/link to the API Reference
* Removed the populating-head section
* Updated links to the new next/link API
* Added link from dynamic-routes to next/link docs
* use a paragraph
* Added next/router API
* Added next/amp
* Updated the docs for next/amp
* Moved the AMP support folder
* Updated title
* Content updates
* Added more links to the data fetching section
* Added links from the API to introductions
* changing the router API
* Updates to the router API
* Updated the routing section
* life improvements
* Added shallow routing section
* Small fix
* Removed old routing sections
* Updated link to shallow routing
* Removed unrequired page
* Removed /pages
* Update data-fetching.md
* Add initial deployments section
* Update manifest.json
* Update introduction.md
* Update deployment doc
* Add static export section updates
* link ssg/ssr
* Update deployment.md
* Add syntax highlighting
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>