Skip to content

Commit

Permalink
chore(docs): Add mentioning of HOSTNAME env variable for standalone o…
Browse files Browse the repository at this point in the history
…utput
  • Loading branch information
steppefox committed Jul 17, 2023
1 parent 9c055db commit 4c68d57
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
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=0.0.0.0 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"]

0 comments on commit 4c68d57

Please sign in to comment.