DarthSim / overmind

Process manager for Procfile-based applications and tmux
MIT License
2.82k stars 79 forks source link

Help: tmux pane for "control" #105

Closed jasonkarns closed 3 years ago

jasonkarns commented 3 years ago

Is there any workaround for specifying a blank shell in the procfile?

Lately, I've been spinning up overmind, connecting, and then manually creating a new tmux pane from which I run overmind commands.

I'd like to be able to just add a control process to the Procfile, but I don't want to actually spin up a process. I just want an open shell in a separate tmux pane.

Suggestions?

DarthSim commented 3 years ago

Hay Jason!

Why do you need a tmux pane for overmind commands?

In fact, you can use something like

control: $SHELL

...but I don't know why :)

jasonkarns commented 3 years ago

The long story: 😄

I use overmind for a lot of "microservice" projects, where the different services are in different repos. (I'm putting microservice in quotes because most of these are still just 1. backend-api, 2. frontend-spa, 3. worker-of-some-sort)

These apps being in different repos means different sub directories for spawning each service. I typically clone them all in a client-specific directory and write a custom Procfile for myself that isn't versioned or shared with the team.

I normally have a separate terminal tab for each of the repos (usually vim); but I then need one more tab at the parent directory for spawning overmind and interacting with it. It's this tab that I normally overmind connect to immediately after starting. But once I'm connected, I no longer have a shell opened at the top level from which to trigger restarts, etc.

I know this could probably just be "solved" by running the overmind commands in the repo subdirectories, but that requires explicitly providing OVERMIND_SOCKET. Hence my thinking to just have a 'control' pane within the tmux session itself.

🤷

What's your typical workflow for projects that are spread across multiple subdirs?

DarthSim commented 3 years ago

I just have one terminal tab with Overmind running and another one with a shell which I use to send Overmind commands. I connect to the tmux session only when I need access to STDIN for debugging and stuff.

I think, control: $SHELL in the Procfile is your best option here.