-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add options for port forwarding #10
Comments
^ Important for me as well. Codespaces has the same issue and it makes most of their port forwarding useless. But, port-hash.domain may not be necessary. It's possible to hide the route using reverse proxy, it's just not something most devs know can be done. Really hoping the developers implement this though, it's pretty important. |
port-workspacename.domain to forward a port is already supported. The port needs to be "exposed" in Dockerfile or devcontainer. But we do need to show the port forwarding url in the dashboard, with the option that the port can be shared with other members in the same organization, or completely public. |
When running in my dev container The logs don't show anything, and the journalctl only shows the ``` Oct 09 15:29:10 lapdev.local lapdev[823]: websocket closed by client |
Which version are you running? That sounded like an old implementation of port fowarding |
It's verion 0.1.0 (ran the install.sh from the site) |
That version should be fine. Can you please double check if the port is exposed? You can check in the |
/proxy/port is probably a built in proxy in code-server. |
The database seems to have no content... I can use see the structure:
but running: It's particularly strange since both the user & workspace appear in the UI, but not in the database, for example. (this is the database from /etc/lapdev.conf) |
I did ensure the ports are exposed in the devcontainer files as well (tried both forwarded ports and app port) |
The ports needs |
Just dropping this here: Proxy almost never works for localhost webapps. Github codespaces and gitpod have the same issue. What's funny is that it can be circumvented entirely by installing browse-lite extension, and doing 'npx playwright install --with-deps', and then setting chrome executable path in browse-lite's settings to /root/.cache/ms-playwright/chromium-1140/chrome-linux/chrome Just like that, can access localhost sites without hair-pulling. Amazed no site has baked-in something similar yet |
The latest master now supports "forwardPorts" in devcontainer. And you can try it on ws.lap.dev. You can see how it works on the Lapce repo. The below is a quick link to create a Lapce workspace. |
The current approach to port forwarding used by lapdev
hash.domain/proxy/port
can cause issues when serving elements that expect access to the root of a given hostname (i.e. where the base url is "/").It would be useful if alternative options - such as
port-hash.domain
- were availableThe text was updated successfully, but these errors were encountered: