You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
This PR allows users to run process-compose for multiple devbox projects
at the same time, without any collisions or undesirable behavior. This
does _not_ provide any isolation between services in different projects,
but it does let a user effectively manage them on a per project basis
## How it works
When starting process-compose in a devbox project, we create a UUID for
the project, and then store the port + PID of the process-compose
instance in a global `process-compose.json` file, with the UUID as the
key.
When making client requests to process-compose, a devbox project looks
up the UUID for the project in the .devbox directory, gets the right
port, and then makes the request. This ensures each project is
communicating with the correct process-compose instance to start and
stop services.
Devbox also uses the same lookup to get the PID of a project's
process-compose instance, so it can stop the right instance.
## Questions:
* Should the project UUID be permanent or set somewhere else? Is there a
better way to identify a project that won't be affected by the user
moving it?
## Future features:
* Let users specify their own process-compose port in `devbox services
up`
* ~Add `devbox services stop --all`, which stops all running
process-compose files and resets the global config. This could help with
situations where a developer accidentally leaves their projects
running.~
## How was it tested?
Ran Example Tests to check backward compatibility, tested by running
postgres + jekyll simultaneously, starting and stopping them
&flags.allProjects, "all-projects", false, "Stop all running services across all your projects.\nThis flag cannot be used simultaneously with the [services] argument")
Short: "Stop service. If no service is specified, stops all services",
74
+
Short: "Stop one or more services in the current project. If no service is specified, stops all services in the current project.",
75
+
Long: `Stop one or more services in the current project. If no service is specified, stops all services in the current project. \nIf the --all-projects flag is specified, stops all running services across all your projects. This flag cannot be used with [service] arguments.`,
0 commit comments