Skip to content

Frontend Unable to Connect to Backend in Kubernetes and Docker Deployments: Requests Default to Localhost #293

Closed Answered by anthony2261
nick1ee asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @nick1ee, thanks for raising the issue. I've looked into it and am working on a fix. The problem is that the docker image serves the frontend app via the backend, and it serves the bundle that was packaged during the docker image build, so it has no way of seeing what the environment variable is at any time.

For the time being, I suggest you do this until the proper fix is released:

  • build the docker image yourself while specifying your api url: docker build --build-arg API_URL="http://localhost:7376" -t dataline . . Of course you should replace http://localhost:7376 with your own value.
  • use the image you just built. Since you're using Kubernetes I'll assume you know how to run the lo…

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
7 replies
@Pin-Jui
Comment options

@RamiAwar
Comment options

@RamiAwar
Comment options

@Pin-Jui
Comment options

@Pin-Jui
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by RamiAwar
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants