eclipse-che / che

Kubernetes based Cloud Development Environments for Enterprise Teams
http://eclipse.org/che
Eclipse Public License 2.0
6.99k stars 1.19k forks source link

Eclipse Che: Unable to expose the endpoint to accessibly url for the sample hello world application using python workspace #22725

Open debkantap opened 11 months ago

debkantap commented 11 months ago

Summary

I using supplied python workspace ("python Hello world") and trying to create hello world application. Here is my code: pip install "fastapi[all]" Python Code : from fastapi import FastAPI app = FastAPI() @app.get("/") async def root(): return {"message": "Hello World"} Then run application with below command: uvicorn main:app --reload

The application is exposed to 127.0.0.0 i.e locally. I modified the devfile as below -- added the exposure directives....

container: image: quay.io/devfile/universal-developer-image:ubi8-latest endpoints:

But no luck. Any clue pls

Relevant information

No response

amisevsk commented 11 months ago

When you run the application in your workspace, you should see a toast notification in the lower right corner of the window prompting you to forward the port to make it accessible from outside of your workspace:

2023-12-08-15:55:58

Clicking "yes" on this dialog will allow you to open the running application in a new tab within your browser.

Some other things worth noting:

che-bot commented 5 months ago

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.