mirror of
https://github.com/jbranchaud/til
synced 2026-08-31 16:51:46 +00:00
Add Connect To Individual Overmind Processes Via tmux as a tmux TIL
This commit is contained in:
@@ -10,7 +10,7 @@ working across different projects via [VisualMode](https://www.visualmode.dev/).
|
||||
|
||||
For a steady stream of TILs, [sign up for my newsletter](https://visualmode.kit.com/newsletter).
|
||||
|
||||
_1876 TILs and counting..._
|
||||
_1877 TILs and counting..._
|
||||
|
||||
See some of the other learning resources I work on:
|
||||
|
||||
@@ -1686,6 +1686,7 @@ If you've learned something here, support my efforts writing daily TILs by
|
||||
- [Change Base Directory Of Existing Session](tmux/change-base-directory-of-existing-session.md)
|
||||
- [Change Base Directory Without Detaching](tmux/change-base-directory-without-detaching.md)
|
||||
- [Change The Default Prefix Key](tmux/change-the-default-prefix-key.md)
|
||||
- [Connect To Individual Overmind Processes Via tmux](tmux/connect-to-individual-overmind-processes-via-tmux.md)
|
||||
- [Create A Named tmux Session](tmux/create-a-named-tmux-session.md)
|
||||
- [Create A New Session In A New Server](tmux/create-a-new-session-in-a-new-server.md)
|
||||
- [Cycle Through Layouts](tmux/cycle-through-layouts.md)
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
# Connect To Individual Overmind Processes Via tmux
|
||||
|
||||
A common `Procfile.dev` in a Rails project might look something like this.
|
||||
|
||||
```
|
||||
web: bin/rails server -p $PORT
|
||||
vite: bin/vite dev
|
||||
worker: bundle exec good_job start
|
||||
```
|
||||
|
||||
Instead of starting up each process that needs to be running for development to
|
||||
work, I can instead run a tool that reads the procfile and sets it all up for me
|
||||
-- like `overmind`.
|
||||
|
||||
```bash
|
||||
❯ overmind start -f Procfile.dev
|
||||
```
|
||||
|
||||
What's cool about `overmind` is that it starts its own `tmux` session and then
|
||||
runs each of these processes in its own window.
|
||||
|
||||
I can connect to any one of them by name with `overmind connect <name>`. Or I
|
||||
can connect to the session defaulting to the first window with just `overmind
|
||||
connect`.
|
||||
|
||||
If I need to see what is going on with my background jobs, I'll run:
|
||||
|
||||
```bash
|
||||
❯ overmind connect worker
|
||||
```
|
||||
|
||||
This behaves like any other tmux session, so I can use my prefix key (`ctrl-z`
|
||||
in my case) to access tmux-specific keybindings. Most notably, once I'm done
|
||||
looking, I'll want to hit `ctrl-z d` to detach from the session.
|
||||
|
||||
I'm already using tmux as my daily driver which means its easy for me to end up
|
||||
in a nested tmux session if I connect while already in my development session.
|
||||
To help with that, I set up [a forwarding
|
||||
prefix](set-up-forwarding-prefix-for-nested-session.md).
|
||||
Reference in New Issue
Block a user