-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Support unix socket for HTTP #172
Comments
Hey @domenkozar, Can you please explain what is the ask here? |
Currently port 9999 is opened and I would like to see support for UNIX sockets, so that multiple process-compose can run in parallel. |
What Domen is asking for really is a file-based socket, that is easy to spawn more of, without conflict (think tmpfile in a pre-specified folder). The port 9999 is just a default value for devenv as the current default port commonly conflicts with other HTTP servers. Support should be added to the process-compose CLI as well to use this method of communicating, by accepting the file path as an env var/explicit arg.
Yes.
That helps for the short term, but it's common to have multiple devenv instances running in parallel (subfolders in a monorepo with different process graphs). |
You can run multiple instances of PC at different ports |
Thanks, but this is clear to everyone, see the original reply from @domenkozar from yesterday: To be able to provide an automatic way in devenv to not have port conflicts (without remembering which ports are taken), a file-based socket with a random name allows an external wrapper of process-compose to handle this. |
graph TD
subgraph project1[Random Project 1]
devenv-1[devenv]
process-compose-1[Process Compose port 9999]
devenv-1 --> process-compose-1
end
subgraph project2[Random Project 2]
devenv-2
process-compose-2[Process Compose port 9999]
devenv-2 --> process-compose-2
end
The goal would be to support running 2 random projects at the same time on the same host, without modifying anything. |
To sum up:
Question: If no socket file name is provided should the default be random: Random advantage:
Predefined advantage:
|
If PC decides a random socket file, how would the client know which file to use when connecting? |
Here's how the Clojure NREPL server solves it (that does random port assignment): A similar approach could be done with the UDS ( |
What's important for devenv is to be able to specify the socket path, as we want to store it into Something like defaulting to |
Added in v1.2.0 |
Thank you! |
See cachix/devenv#1091
The text was updated successfully, but these errors were encountered: