-
Notifications
You must be signed in to change notification settings - Fork 655
Description
Question
I'm using the dev container for attempt at local development.
Using the default configuration and running make configure-dev, I wasn't able to access the config-ui from outside the container.
After some digging, I found it was because Vite's dev server binds to localhost by default, which is only reachable inside the container.
I was able to resolve it by adding the --host parameter to the "start": "vite" inside the package.json file.
This makes it listen on 0.0.0.0, which lets VS Code's port-forwarder hook in.
EDIT:
I also run into a problem with accessing and then querying grafana when proxied via config-ui due to exposure and then origin not allowed issues.
I'm able to resolve it by modifying the vite dev server so grafana proxy targets to http://grafana:3000 and disabling changeOrigin.
My question is, am I missing a way to make it work without any changes?
I'm wondering if the original author of the dev container had it work in a different way.
If not, I'm willing to contribute a PR with this change that should allow config-ui and grafana access from outside the dev container out-of-the-box (without affecting local development).
Thanks!