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

Add background processes #83

Closed
wants to merge 2 commits into from

Conversation

JanLikar
Copy link
Contributor

Use devenv up -d to run honcho with nohup.

devenv down and devenv logs are also included and are analog to their docker-compose counterparts.

@JanLikar
Copy link
Contributor Author

This is first and foremost a PoC, so feel free to voice any concerns you might have, I'm more than happy to address them :)

src/devenv.nix Show resolved Hide resolved
Use `devenv up -d` to run honcho processes in the background with nohup.

`devenv down` and `devenv logs` are also included.

See cachix#80.
@domenkozar
Copy link
Member

I'm still not sure about this one.

Could you explain what kind of workflow do you have that requires this interface?

@JanLikar
Copy link
Contributor Author

I often do not need to see application logs while working on the app, so I find it kinda annoying that I need to keep one terminal running just to keep the app running.

@shyim
Copy link
Contributor

shyim commented Nov 29, 2022

I would like to call that also in Gitpod to have one shell.

devenv up -d
devenv shell

and let the user work in the shell and don't have to care about the running services

@domenkozar
Copy link
Member

We need to figure how how this interacts with different process backends. Probably each needs to return a pid?

@JanLikar
Copy link
Contributor Author

JanLikar commented Dec 7, 2022

I guess so, yes

@thenonameguy
Copy link
Contributor

I recommend creating a prototype using https://github.com/NixOS/nixpkgs/blob/e66309ddcce8fc316b9addeabd11bf2187fa2eb9/pkgs/tools/system/daemonize/default.nix.
This works by wrapping arbitrary programs and turns them into daemon processes.
Should be what we need without relying on the programs to do this themselves.

@thenonameguy
Copy link
Contributor

Started discussion about upstreaming this feature to process-compose so we don't need the above comment:
F1bonacc1/process-compose#35

This way not only the honcho implementation could fulfill the new interface.

@Nebucatnetzer
Copy link
Contributor

Another use case is bootstrapping the project.
E.g. I start Postgres and Django in the background and then I run some commands to run migrations and insert fixtures.
Afterwards I open the URL for the dev server in the browser.
The dev then can start developing and if he needs to reattach to the log view.
I'm currently doing this with overmind.

@domenkozar
Copy link
Member

This is now implemented in #745

@JanLikar JanLikar closed this Jan 14, 2024
@JanLikar JanLikar deleted the background-processes branch January 14, 2024 17:05
@domenkozar domenkozar mentioned this pull request Mar 11, 2024
2 tasks
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

Successfully merging this pull request may close these issues.

5 participants