Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): Add mentioning of HOSTNAME env variable for standalone output #52804

Merged
merged 2 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/02-app/02-api-reference/05-next-config-js/output.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Additionally, a minimal `server.js` file is also output which can be used instea
>
> - `next.config.js` is read during `next build` and serialized into the `server.js` output file. If the legacy [`serverRuntimeConfig` or `publicRuntimeConfig` options](/docs/app/api-reference/next-config-js/runtime-configuration) are being used, the values will be specific to values at build time.
> - If your project uses [Image Optimization](/docs/app/building-your-application/optimizing/images) with the default `loader`, you must install `sharp` as a dependency:
> - If your project needs alternative port or hostname for listening, you can define `PORT` and `HOSTNAME` environment variables, before running `server.js`. For example, `PORT=3000 HOSTNAME=localhost node server.js`.

</AppOnly>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ USER nextjs
EXPOSE 3000

ENV PORT 3000
ENV HOSTNAME localhost

CMD ["node", "server.js"]
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@ USER nextjs
EXPOSE 3000

ENV PORT 3000
ENV HOSTNAME localhost

CMD ["node", "server.js"]
1 change: 1 addition & 0 deletions examples/with-docker-multi-env/docker/staging/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@ USER nextjs
EXPOSE 3000

ENV PORT 3000
ENV HOSTNAME localhost

CMD ["node", "server.js"]
1 change: 1 addition & 0 deletions examples/with-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@ USER nextjs
EXPOSE 3000

ENV PORT 3000
ENV HOSTNAME localhost

CMD ["node", "server.js"]