-
-
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
Feature Request: Run a "sanity-check" program #14
Comments
Hey @IngwiePhoenix,
Maybe I will have more questions in the future :) |
Good morning! You are most welcome!
Feel free to ask! I am not very good with Go, so there is not that much I can contribute. More of a C and Nodejs guy. ^^; |
Good afternoon. I think I have a clearer picture of what you want to achieve. The only thing that is missing is the ability to exit on process failure.
What do you think, @IngwiePhoenix? You are contributing a lot by using the project and thinking about new use cases 😊 |
Hey!
Good point, didn't think of that. So basically: sanitycheck:
command: ./scripts/run-checks.sh
other_proc:
command: ...
depends_on:
sanitycheck:
condition: process_completed_successfuly Like so?
I like 2 a lot. 5 is not a big problem really - at least I don't think so.
Haha, thanks! Most welcome as well. :) |
Hey @IngwiePhoenix |
Thanks for the great issue @IngwiePhoenix! My 2 cents on this as user is that instead of trying to treat the symptoms of an incorrect environment in Example:
Handling this with bespoke shell scripts gets tiring/error-prone really quick, and Even so a simple bash function can accomplish this today:
Leaving you with the option to easily opt-out of the check by just invoking |
Hi @thenonameguy, Something similar to what I proposed to @IngwiePhoenix : sanitycheck:
command: "which go"
availability:
restart: "exit_on_failure" #new functionality
other_proc:
command: ...
depends_on:
sanitycheck:
condition: process_completed_successfuly |
Hey @thenonameguy !
Not wrong, I agree! It's an idea I had to bring down the external programms needed mainly. I go between platforms a lot; my laptop does not have WSL or Msys - only Docker. My Desktop has WSL with Nix and Docker and my server is a pure Debian box with only Docker, no Nix. So, for "between platform goers", it might be easier to have that feature, hence why I suggested it. Hey @F1bonacc1 ! Just noticed you linked a PR and subsequent commits; I'll goa nd check out the new additions! Sorry for my late response, got a little side-tracked IRL... :) |
Hi @IngwiePhoenix, I added the ability to exit if the process fails This functionality is part of v0.21.0 release. |
To do this, we must restructure the options such as that the top-level option is an attrset of submodules. Each submodule then can have its own port/tui (cli) options.
Hello!
This is a very great project! I have been looking for a much smaller but still capable process supervisor compared to PM2 and this looks like it is exactly what i need :)
I would like to request/suggest a feature: Allow the user to specify a "sanity check". For instance, imagine this shell script:
If either of these fail, the script exits with exit code 1.
What I would like to do is to run this before any of the processes are invoked as a way to introduce a script that verifies the environment if everything is exactly where it should be. :)
Again thanks a lot for this project, been playing around with it today a lot and it's great!
Kind regards,
Ingwie
The text was updated successfully, but these errors were encountered: