This gem wraps the Overmind library and includes all the dependencies needed to work with it.
Overmind is a process manager for Procfile-based applications and tmux. With Overmind, you can easily run several processes from your Procfile in a single terminal.
Learn more about Overmind here.
Note: At the moment, Overmind supports Linux, *BSD, and macOS only.
This gem already has all the necessary dependencies and doesn't require any libraries to be installed.
But for users of the *BSD system, it requires the installation of tmux
.
- FreeBSD:
pkg install tmux
Note:: You can find more information about the tmux
installation here
gem install overmind
Overmind can improve your DX of working on multi-process Ruby on Rails applications. First, add it to your Gemfile:
group :development do
gem "overmind"
end
We recommend installing it as a part of your project and not globally, so the version is kept in sync for everyone on your team.
Then, for simplicity, we suggest generating a bin stub:
bundle binstubs overmind
Finally, change the contents of bin/dev
(or add this file) as follows:
#!/usr/bin/env sh
bin/overmind start -f Procfile.dev
Now, your bin/dev
command uses Overmind under the hood.
One of the biggest benefits is that now you can connect to any process and interact with it, for example, for debugging a web process:
bin/overmind connect web
Overmind reads the list of processes you want to manage from a file named Procfile
. It may look like this:
web: bin/rails server
worker: bundle exec sidekiq
assets: gulp watch
To get started, you just need to run Overmind from your working directory containing a Procfile
:
# in Rails project
bin/overmind start
# Ruby
overmind start
If a Procfile
isn't located in your working directory, you can specify the exact path:
bin/overmind start -f path/to/your/Procfile
OVERMIND_PROCFILE=path/to/your/Procfile bin/overmind start
If you need to gain access to process input, you can connect to its tmux
window:
bin/overmind connect <process_name>
You can safely disconnect from the window by hitting Ctrl b
(or your tmux prefix) and then d
.
You can omit the process name to connect to the first process defined in the Procfile.
You can restart a single process without restarting all the other ones:
bin/overmind restart sidekiq
You can stop a single process without stopping all the other ones:
bin/overmind stop sidekiq
More features and abilities are here