Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upControlling services in bulk or better/flexible --all behavior #151
Comments
This comment has been minimized.
This comment has been minimized.
This may not be helpful at all but inspired by this discussion, I’ve hacked together a really crude one-off prototype for a lightweight implementation of presets. It uses one custom formula per preset, runs with homebrew-services as-is, and requires nothing else. Because it’s just a formula, it also auto-detects the dependencies. Usage:
To customize, just change this array: DEPENDENT_SERVICES = [
"mariadb",
"nginx",
"php",
] I’m surprised to see this actually works for me. Feel free to use it as a stop-gap until someone builds something more maintainable. (Or maybe in case the presets feature turns out too narrow to be added to homebrew-services proper.) |
This comment has been minimized.
This comment has been minimized.
Thank you @claui, I'll give it a shot soon. Looks promising! |
This comment has been minimized.
This comment has been minimized.
This is a good idea, thanks for the detailed write up @ihorvorotnov! |
MikeMcQuaid
added
the
help wanted
label
Mar 5, 2018
This comment has been minimized.
This comment has been minimized.
@steinmb Your comment was completely unrelated to this repository. The other thread was locked for a reason. |
Homebrew
deleted a comment from
steinmb
Mar 5, 2018
This comment has been minimized.
This comment has been minimized.
steinmb
commented
Mar 5, 2018
@MikeMcQuaid Thank you for getting back to me, though deleting comments is to me a unusual way of treating other developers. Ended up there because other issues got closed and linked in here. Should I create a separate issue regarding the dependency issue? |
This comment has been minimized.
This comment has been minimized.
@steinmb No, we are not interested in more discussion of that issue or of Homebrew's moderation policy with non-maintainers or non-contributors (particularly when Homebrew's maintainers are currently being barraged with personal abuse). |
nikolas
added a commit
to nikolas/github-drama
that referenced
this issue
Mar 5, 2018
This comment has been minimized.
This comment has been minimized.
steinmb
commented
Mar 6, 2018
@MikeMcQuaid Sorry to hear that. Take care and thank you for all your hard work. |
This comment has been minimized.
This comment has been minimized.
|
ihorvorotnov commentedMar 1, 2018
The discussion started here.
Currently, you can only start|stop|reload services one by one or all of them at once with
--all
flag. However, in some cases, you need finer control.For example, now PHP migrated to homebrew/core and comes with Apache as a dependency. I'm using Nginx instead of Apache, and have a lot of other related services. Here's the list:
Basically, it's a local web development environment. Prior to this PHP migration, I could
brew services start --all
to bring it up, andbrew services stop --all
when done. Now I can't – it starts Apache as well.Also, redis/memcached substitute each other in many cases, it makes sense to run only one of them at a time. Same applies to a different database engine, for example, MySQL and PostgreSQL, MongoDB etc. Also, Nginx, H2O. In most cases, you don't need them all to be running at the same time and running them one by one is annoying.
Of course, you can write a simple shell command to run required services in bulk, but wouldn't it be convenient to have a built-in command to handle some kind of "presets"?