Skip to content
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

Single container / port? #28

Closed
shaunco opened this issue Dec 7, 2023 · 2 comments
Closed

Single container / port? #28

shaunco opened this issue Dec 7, 2023 · 2 comments

Comments

@shaunco
Copy link

shaunco commented Dec 7, 2023

Really great work here!

Is there a specific reason to have postgrest and remote as separate containers rather than just having the ui container handle them at /postgrest/... and /remote/...?

Then, along those same lines, why does the remote container need to split each ttyd onto a different port? Seems like it could either use a WebSocket per open ssh tunnel or do something like /ttyd/1, /ttyd/2, etc. Am I missing something here?

@dcaputo-harmoni
Copy link
Owner

Really just to separate out functionality, ui is a web app, postgrest is a standalone service and remote is a custom proxy handler along with supporting tools like ttyd. Similar reasons to why balena separated out registry, s3, api, vpn, etc.

The ttyd's are split on different ports to allow it to handle concurrent sessions, it uses the port number in the cookie to know which session is being handled. To use only one port we would need to devise a different way to do that. I think it's a great idea, but would require some work. Any interest in helping / submitting a PR?

@shaunco
Copy link
Author

shaunco commented Dec 11, 2023

I should have some time over the holidays to make a pass at rewriting remote to use websockets on a single port. I'll submit a PR if I get it all working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants