Make external URL of exposed endpoints of the workspace available as environment variable of all the containers
See original GitHub issueIs 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:
- Created 4 years ago
- Comments:13 (12 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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.