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
When starting the official docker container in a hosted env, we can use all functionalities of the dashboard without a problem. Just when we try to use the GraphiQL playground, we can't, as it tries to request the wrong default URL:
JannikZed
changed the title
[Bug]: Docker: replace env variables also in JS files
[Bug]: Docker: replace env variables also in JS files, make GraphiQL work
Jan 8, 2025
Description of the issue
When starting the official docker container in a hosted env, we can use all functionalities of the dashboard without a problem. Just when we try to use the GraphiQL playground, we can't, as it tries to request the wrong default URL:
When looking at the source code, we think that the problem is in the devmode panel component: https://github.com/saleor/saleor-dashboard/blob/9b33a11522485547e5f998ac29ca84c6ccb804a2/src/components/DevModePanel/DevModePanel.tsx
you are using process.env.API_URL here, which is only read during the build process, but not in the runtime.
It might work to just add the JS files also to the env substitution:
saleor-dashboard/nginx/replace-env-vars.sh
Line 8 in 9b33a11
Steps to reproduce the problem
Start the dashboard from the official docker container and set the API_URL to a cloud hosted saleor. Try accessing the GraphiQL playground.
What did you expect to happen?
The playground connects to the API_URL that we set during runtime. We don't need to rebuild for that to work.
Additional information
No response
Environment
Browser and version: …
OS and version: …
Dashboard version: 3.20
Core version: …
The text was updated successfully, but these errors were encountered: