-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Services] Keep Process Compose alive in background, add
attach
com…
…mand (#2269) ## Summary This fixes two previously reported issues: 1. If process-compose is not terminated gracefully (e.g., it's parent shell crashes, or is closed on accident), then process-compose may terminate without also terminating it's services. 2. If process-compose is started in the background, a user can now run the `attach` command to re-attach the TUI to the backgrounded process compose A few current limitations: 1. This only applies to `devbox services up -b`, but could be extended to `devbox services up` as well by starting process-compose in the background, and then attaching the TUI 2. You will now need to explicitly run `devbox services stop` to stop process-compose for your project Todos: 1. Should we apply the backgrounding to `devbox services up` as well? 2. Should we allow users to specify a port or specific process-compose instance to attach to? 3. If so, should we list the process-compose instances somewhere? ## How was it tested? Tested on the Apache example: Attach: 1. Run `devbox services up -b` in the apache folder 2. Run `devbox services attach` in the apache folder, verify that it launches the TUI 3. Hit Ctrl-C to exit the TUI Backgrounding: 4. Run `devbox services list`, verify that process-compose is still running 5. Terminate your shell or editor 6. Launch a new shell or editor, navigate to the apache example 7. Run `devbox services list` to verify that process-compose is still running.
- Loading branch information
Showing
3 changed files
with
84 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters