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
Currently, we are using an environment variable NEXT_PUBLIC_STRAPI_BACKEND_URL in the frontend app.
But this variable gets fixed at build time, making the Docker image only compatible with a single environment.
Current situation:
To make an environment variable accessible in the browser, we have to prefix the variable with NEXT_PUBLIC_
But by doing so, the value will be fixed at build time -> this is causing the problem now
We are passing in the variable at the build time here:
Currently, we are using an environment variable
NEXT_PUBLIC_STRAPI_BACKEND_URL
in the frontend app.But this variable gets fixed at build time, making the Docker image only compatible with a single environment.
Current situation:
NEXT_PUBLIC_
publish/.github/workflows/build.yml
Lines 36 to 41 in 8d1a173
To fix the issue, we have to either:
getServerSideProps
NEXT_PUBLIC_
variable, build the frontend Docker image for each environmentReference:
https://nextjs.org/docs/pages/building-your-application/configuring/environment-variables#runtime-environment-variables
The text was updated successfully, but these errors were encountered: