You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide one or more example implementations for users who wish to deploy Next.js projects via Docker to multiple environments with a single container image
Add a new example project that implements at least one, possibly more than one, method for providing runtime configuration for different environments, with the running code (and, thus, the contents of the container) not changing per environment.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Non-Goals
Background
https://www.saltycrane.com/blog/2021/04/buildtime-vs-runtime-environment-variables-nextjs-docker/ describes various methods to use runtime configuration, and gives some snippets, but no fully working examples, and doesn't delve into the potential consequences of using methods like
getServerSideProps
https://nextjs.org/docs/pages/building-your-application/configuring/environment-variables mentions the possibility of building an API to serve runtime configuration to otherwise-static pages, but no examples are given.
Proposal
Add a new example project that implements at least one, possibly more than one, method for providing runtime configuration for different environments, with the running code (and, thus, the contents of the container) not changing per environment.
Beta Was this translation helpful? Give feedback.
All reactions