question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make external URL of exposed endpoints of the workspace available as environment variable of all the containers

See original GitHub issue

Is your enhancement related to a problem? Please describe.

For some applications with multiple containers, sometimes the frontend need to access to the backend from the browser. (For instance a React Native frontend would typically do that. But there is no way to retrieve the external url of a exposed endpoint.

The workaround at the moment is to copy from my workspace root manually and set that to the frontend app (in react native, we change the file .env)

Describe the solution you’d like

For all exposed end point, add a env variable with the name of the end point. For instance, a endpoint

    endpoints:
      - name: 3000/tcp
        port: 3000

could be store as env variable 3000-TCP-EXTERNAL

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
sunixcommented, Jul 27, 2020

Hello, This is important to have for cloud native apps that would need the browser components to talk to other components of the application. Setting p1.

1reaction
sleshchenkocommented, Mar 23, 2021

the endpoints urls should be already available in devworkspaces in the mount file. See https://github.com/devfile/devworkspace-operator/pull/318

But environment variables are still a valid idea and easier to use by apps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chapter 4. Configuring CodeReady Workspaces
Configures environment variable HTTPS_PROXY to a specified value in containers powering workspaces. CHE_WORKSPACE_NO__PROXY. Configures environment variable ...
Read more >
Environment variables in Compose | Docker Documentation
There are multiple parts of Compose that deal with environment variables in one sense or another. This page should help you find the...
Read more >
GitLab CI/CD variables
Documentation for GitLab Community Edition, GitLab Enterprise Edition, Omnibus GitLab, and GitLab Runner.
Read more >
Variables and secrets | Bitbucket Cloud - Atlassian Support
Variables are configured as environment variables in the build container. ... The URL for the origin, for example: http://bitbucket.org/<workspace>/<repo>.
Read more >
Exposing applications using services | Google Kubernetes ...
This page shows how to create Kubernetes Services in a Google Kubernetes Engine ... The env object specifies that the PORT environment variable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found