-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[FEAT] fully functioning terminal #2586
base: next
Are you sure you want to change the base?
Conversation
Looks great. I know that this is maybe not possible but adding an extra container to each application deployed is not ideal, could this container just be deployed once on the coolify level? And also each stack/ app and services have their own network for isolation so I am not sure if 'netowork -coolify' will work |
@ayntk-ai It already looks like it is only one container per Coolify instance. Correct me if I am wrong, @LEstradioto |
Yep, it resides with coolify network, so it should be only one per instance. About isolation, I used the same logic implemented before with Command Center sending the commands to containers, but, the difference is the long running attached process with support of Websocket. Without Websocket, Ive tried to use PHP Eventloops, but I couldnt resolve. Another way would be to re-use Laravel Pusher/Echo, and soketi, but they dont provide SDK to re-use the same process (that would be perfect because we already have a 'coolify realtime container running') Anyway still need a separate process |
Do you think you can add traefik routing as well, so we don't have to open ports on production? |
Really amazing. What about the network settings: In coolify there is a different destionation/network for each service, will this just work with the |
@Thijmen I tried to route it to avoid open a new port. I can't get it working. @ayntk-ai I couldnt test on different sever, but probably would work since main host is like a root/sudo... right? |
@LEstradioto I am not sure, but I think the problem might be that the terminal container needs to be redeployed for each new service/application we spin up, as each of these comes with its own network: network-uuid, this is automatic, and we can also manually add networks to services by selecting predefined networks. Maybe I am wrong and the |
ps.: my styling is awful 😭 Added some milestone to improve at title |
@Thijmen I think I did it ! Dont need to open firewall port anymore, reverse proxy seems to work. Tested on localhost only though. |
now help wanted about three things:
|
3 things that would be nice for this:
|
I think @LEstradioto could use your help with these above @Thijmen |
So, answering myself here: Accessing the container's SSH string requires knowing the container's name/uuid, which is unlikely without prior access. Users on this page can likely modify containers in various ways. Authentication before connection isn't necessary since the route already handles it. |
Initially, I thought this ideas was useful. However, it seems more suited for a development environment, which is not typical for this kind of terminal, since it would require a better dev setup. This might be better addressed in another pull request or discussions to understand its use cases. I couldn't find a good use for it myself, so I'm unsure. |
I think @ayntk-ai would make a great product owner, I am absolutely loving the ideas! 🙌 |
f0e7ae6
to
9c42ba1
Compare
I think it's done! I would appreciate a review on this, especially the last commit on Docker Compose. I'm not entirely sure if this meets your expectations in all aspects @andrasbacsai 🙏 Regarding destinations, I added servers using the Coolify Dashboard, and everything ran smoothly. I haven't tested with Swarm, but it should work as well. I also didn't test with a new network as @ayntk-ai mentioned earlier. In my tests, Coolify manages everything under one network and isolates by teams only. Am I wrong? I'm probably just tired now. Going to sleep, bye! 🤣 |
@LEstradioto I will try it out once it is released. I think you should merge it into next and remove WIP. |
3065677
to
5e4a3bb
Compare
5e4a3bb
to
09b1520
Compare
Updated OP with a brief "How it works" section to make it easier for @andrasbacsai to review. |
closes #2298
How it works:
RequestTTY=yes
option passed by as args. To enable direct connection between socket and terminal using PTYwebsocket server and node-pty integration with coolify servers and containersreversed-proxy websocket port 6002, no need to firewall anymoreenables copy/paste on terminal and text selection fixed with css zoom attribute tweakFEAT: Implement flow control as recommended by xterm documentation (is this really important?). Consider using socket.io or sockette for better performance and reliability.ensure better resizing to xterm (window resize and mobile)rethink about getAllActiveContainersUUID()Double check securityTest destinationsAdd it to any other Command center = ExecuteContainerCommandRefactor and add it to Prod