### Build and Install Overmind from Go Source Source: https://github.com/darthsim/overmind/blob/master/README.md Instructions to build and install Overmind directly from its Go source code. This method requires Go 1.21 or later and installs the binary to your GOPATH. ```go go install github.com/DarthSim/overmind/v2@latest ``` -------------------------------- ### Example Overmind Procfile Source: https://github.com/darthsim/overmind/blob/master/packaging/rubygems/README.md An example `Procfile` demonstrating how to define multiple processes (web, worker, assets) for Overmind to manage, specifying the commands to run for each. ```Procfile web: bin/rails server worker: bundle exec sidekiq assets: gulp watch ``` -------------------------------- ### Install tmux on FreeBSD Source: https://github.com/darthsim/overmind/blob/master/packaging/rubygems/README.md Instructions to install `tmux` on FreeBSD systems, which is a prerequisite for Overmind on *BSD systems. ```bash pkg install tmux ``` -------------------------------- ### Install tmux on Ubuntu Source: https://github.com/darthsim/overmind/blob/master/README.md Instructions to install tmux on Ubuntu using apt-get. tmux is a prerequisite for Overmind's functionality, as Overmind leverages tmux sessions for process management. ```bash apt-get install tmux ``` -------------------------------- ### Install Overmind Ruby Gem Source: https://github.com/darthsim/overmind/blob/master/packaging/rubygems/README.md Command to install the Overmind gem globally using `gem install`. ```bash gem install overmind ``` -------------------------------- ### Get Overmind Command-line Help Source: https://github.com/darthsim/overmind/blob/master/README.md Basic commands to access help documentation for Overmind from the command line, providing information on available commands and their usage. ```bash overmind -h overmind help [command] ``` -------------------------------- ### Start Overmind with default Procfile Source: https://github.com/darthsim/overmind/blob/master/packaging/rubygems/README.md Commands to start Overmind, either in a Rails project using its binstub or globally, to manage processes defined in the default `Procfile` located in the current working directory. ```bash bin/overmind start # Ruby overmind start ``` -------------------------------- ### Install Overmind with Homebrew on macOS Source: https://github.com/darthsim/overmind/blob/master/README.md Command to install Overmind on macOS using the Homebrew package manager. This is the recommended installation method for macOS users. ```bash brew install overmind ``` -------------------------------- ### Install Ruby Dependencies Source: https://github.com/darthsim/overmind/blob/master/packaging/rubygems/RELEASING.md Installs the necessary Ruby dependencies for the project using Bundler. This command should be run before building gems to ensure all required libraries are available. ```bash bundle install ``` -------------------------------- ### Install tmux on macOS Source: https://github.com/darthsim/overmind/blob/master/README.md Instructions to install tmux on macOS using Homebrew. tmux is a prerequisite for Overmind's functionality, as Overmind leverages tmux sessions for process management. ```bash brew install tmux ``` -------------------------------- ### Start Overmind with Default Procfile Source: https://github.com/darthsim/overmind/blob/master/README.md Shows how to initiate Overmind from a directory containing a `Procfile`. This snippet includes both the full command and its commonly used short alias for convenience. ```bash $ overmind start ``` ```bash $ overmind s ``` -------------------------------- ### Start Overmind with custom Procfile path Source: https://github.com/darthsim/overmind/blob/master/packaging/rubygems/README.md Commands to start Overmind, specifying an alternative `Procfile` path using the `-f` flag or by setting the `OVERMIND_PROCFILE` environment variable, useful when the Procfile is not in the current directory. ```bash bin/overmind start -f path/to/your/Procfile OVERMIND_PROCFILE=path/to/your/Procfile bin/overmind start ``` -------------------------------- ### Install Overmind with RubyGems Source: https://github.com/darthsim/overmind/blob/master/README.md Command to install Overmind using RubyGems, Ruby's package manager. This method is suitable for environments where Ruby is already set up. ```ruby gem install overmind ``` -------------------------------- ### Configure Overmind Port Base and Step Source: https://github.com/darthsim/overmind/blob/master/README.md Shows how to customize the starting port number (base) and the increment step for `PORT` assignments. This configuration can be applied using command-line flags or corresponding environment variables. ```bash $ overmind start -p 3000 -P 10 ``` ```bash $ OVERMIND_PORT=3000 OVERMIND_PORT_STEP=10 overmind start ``` -------------------------------- ### Configure bin/dev for Overmind in Rails Source: https://github.com/darthsim/overmind/blob/master/packaging/rubygems/README.md Modify or create the `bin/dev` script in a Rails project to use Overmind for starting processes defined in `Procfile.dev`, enabling `bin/dev` to manage your development processes. ```shell #!/usr/bin/env sh bin/overmind start -f Procfile.dev ``` -------------------------------- ### Run Overmind as a Daemon Source: https://github.com/darthsim/overmind/blob/master/README.md Starts Overmind in daemon mode, allowing it to run in the background independently. This enables continuous process management without keeping a terminal open. Commands are provided to start the daemon, view its logs, and gracefully quit the daemonized instance. ```bash $ overmind start -D ``` ```bash $ OVERMIND_DAEMONIZE=1 overmind start ``` ```bash $ overmind echo ``` ```bash $ overmind quit ``` -------------------------------- ### Configure Overmind Environment Variables Source: https://github.com/darthsim/overmind/blob/master/README.md Defines environment variables for Overmind processes by placing `variable=value` pairs in `.overmind.env` or `.env` files. These files are loaded in a specific order, allowing for flexible environment setup before processes are launched. Additional environment files can be specified via `OVERMIND_ENV`. ```text PATH=$PATH:/additional/path OVERMIND_CAN_DIE=npm_install OVERMIND_PORT=3000 ``` ```bash $ OVERMIND_ENV=./.env.local,./.env.development overmind s ``` -------------------------------- ### Exclude Specific Processes from Overmind Startup Source: https://github.com/darthsim/overmind/blob/master/README.md Illustrates how to prevent Overmind from starting certain processes defined in the `Procfile`. This is done by specifying the processes to be ignored using a command-line flag or an environment variable. ```bash $ overmind start -x web,sidekiq ``` ```bash $ OVERMIND_IGNORED_PROCESSES=web,sidekiq overmind start ``` -------------------------------- ### Specify Overmind Unix Socket Path Source: https://github.com/darthsim/overmind/blob/master/README.md Configures Overmind to use a custom Unix socket path for communication instead of the default `.overmind.sock`. This allows for explicit control over where Overmind listens for commands and is supported across various Overmind commands like `start`, `connect`, `restart`, and `kill`. ```bash $ overmind start -s path/to/socket ``` ```bash $ OVERMIND_SOCKET=path/to/socket overmind start ``` ```bash $ overmind connect -s path/to/socket web ``` ```bash $ overmind restart -s path/to/socket sidekiq ``` ```bash $ overmind kill -s path/to/socket ``` -------------------------------- ### Run Command in Overmind Environment Source: https://github.com/darthsim/overmind/blob/master/README.md Executes a specified command within the environment configured by Overmind's `.env` files. This ensures that the command has access to all environment variables defined for Overmind processes, facilitating tasks like dependency installation or script execution. ```bash $ overmind run yarn install ``` -------------------------------- ### Add Overmind to Rails Gemfile Source: https://github.com/darthsim/overmind/blob/master/packaging/rubygems/README.md Add the Overmind gem to the development group in a Rails application's Gemfile for project-specific installation, ensuring version consistency across the team. ```ruby group :development do gem "overmind" end ``` -------------------------------- ### Build Overmind Gem for Specific Platform Source: https://github.com/darthsim/overmind/blob/master/packaging/rubygems/RELEASING.md Builds an Overmind gem for a specified platform and architecture using a Rake task. Examples include Linux x86_64 and macOS arm64. This functionality requires Ruby 3.0 or higher due to its enhanced support for the `--platform` argument in RubyGems. ```bash rake "overmind:build:linux[amd64]" # linux x86_64 rake "overmind:build:macos[arm64]" # macos arm64 ``` -------------------------------- ### Understand Process Exclusion Precedence in Overmind Source: https://github.com/darthsim/overmind/blob/master/README.md Demonstrates that the process exclusion (`-x`) flag takes precedence over the process inclusion (`-l`) flag when both are used. If a process is both included and excluded, it will not be started. ```bash $ overmind start -l web -x web ``` ```bash $ OVERMIND_IGNORED_PROCESSES=web OVERMIND_PROCESSES=web overmind start ``` -------------------------------- ### Scale Overmind Processes (Formation) Source: https://github.com/darthsim/overmind/blob/master/README.md Explains how to specify the number of instances for each process to run, allowing for scaling of individual processes or all processes using the `all` keyword. It also shows how to prevent a process from running by setting its instance count to zero. ```bash $ overmind start -m web=2,worker=5 ``` ```bash $ OVERMIND_FORMATION=web=2,worker=5 overmind start ``` ```bash $ overmind start -m all=2,worker=5 ``` ```bash $ OVERMIND_FORMATION=all=2,worker=5 overmind start ``` ```bash $ overmind start -m some_production_task=0 ``` ```bash $ OVERMIND_FORMATION=some_production_task=0 overmind start ``` -------------------------------- ### Define Application Processes in Procfile Source: https://github.com/darthsim/overmind/blob/master/README.md Illustrates the basic structure of a `Procfile` used by Overmind to define application processes. Each line specifies a process name and its corresponding command to be executed. ```Procfile web: bin/rails server worker: bundle exec sidekiq assets: gulp watch ``` -------------------------------- ### Generate Overmind Binstub for Rails Source: https://github.com/darthsim/overmind/blob/master/packaging/rubygems/README.md Generate a binstub for Overmind in a Rails project to simplify command execution and integrate it with `bin/dev`. ```bash bundle binstubs overmind ``` -------------------------------- ### Compile tmux for Linux (Multi-arch) using Docker Buildx Source: https://github.com/darthsim/overmind/blob/master/packaging/tmux/README.md This command uses Docker buildx to compile tmux binaries for multiple Linux architectures (amd64, arm64, arm/v7, 386). The output is saved locally in the 'dist' directory. It addresses cross-compilation for various Linux environments. ```bash docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/386 -t tmux-multiarch:latest --output type=local,dest=./dist data ``` -------------------------------- ### Connect to a specific Overmind process (Rails) Source: https://github.com/darthsim/overmind/blob/master/packaging/rubygems/README.md Command to connect to a running 'web' process managed by Overmind, useful for debugging and interacting with the process's input. ```bash bin/overmind connect web ``` -------------------------------- ### Generate tmux Binaries on macOS/Linux Source: https://github.com/darthsim/overmind/blob/master/packaging/tmux/README.md This command executes a shell script to generate tmux binaries. It is specifically designed for macOS but also works on Linux to produce platform-specific binaries. The script handles the compilation process. ```bash ./scripts/generate_tmux.sh ``` -------------------------------- ### Connect to an Overmind process Source: https://github.com/darthsim/overmind/blob/master/packaging/rubygems/README.md Command to connect to a specific process's `tmux` window managed by Overmind, allowing direct interaction. Users can disconnect by hitting `Ctrl b` (or their tmux prefix) and then `d`. ```bash bin/overmind connect ``` -------------------------------- ### Configure Auto-Restart for Overmind Processes Source: https://github.com/darthsim/overmind/blob/master/README.md Demonstrates how to configure Overmind to automatically restart specific processes or all processes if they crash. This ensures continuous operation and resilience for critical services. ```bash $ overmind start -r rails,webpack ``` ```bash $ OVERMIND_AUTO_RESTART=rails,webpack overmind start ``` ```bash $ overmind start -r all ``` ```bash $ OVERMIND_AUTO_RESTART=all overmind start ``` -------------------------------- ### Reference Ports of Other Overmind Processes Source: https://github.com/darthsim/overmind/blob/master/README.md Demonstrates how processes can reference the dynamically assigned ports of other processes managed by Overmind. This is achieved through `OVERMIND_PROCESS__PORT` environment variables, enabling inter-process communication. ```Procfile web: bin/rails server -p $PORT proxy: ngrok http --subdomain overmind $OVERMIND_PROCESS_web_PORT ``` -------------------------------- ### Reference Dynamic PORT Variable in Procfile Source: https://github.com/darthsim/overmind/blob/master/README.md Illustrates how to utilize the `PORT` environment variable, which is automatically set by Overmind for each process. This allows processes to dynamically bind to assigned ports. ```Procfile web: bin/rails server -p $PORT ``` -------------------------------- ### Connect to an Overmind Process Source: https://github.com/darthsim/overmind/blob/master/README.md Connects to a running Overmind process's tmux window, allowing interaction with its input and output. You can specify a process name or omit it to connect to the first defined process. Instructions for safely disconnecting from nested tmux sessions are also provided. ```bash $ overmind connect ``` -------------------------------- ### Specify Custom Procfile Path for Overmind Source: https://github.com/darthsim/overmind/blob/master/README.md Demonstrates how to explicitly provide the path to a `Procfile` if it's not located in the current working directory. This can be done using a command-line flag or by setting an environment variable. ```bash $ overmind start -f path/to/your/Procfile ``` ```bash $ OVERMIND_PROCFILE=path/to/your/Procfile overmind start ``` -------------------------------- ### Specify Custom Tmux Configuration for Overmind Source: https://github.com/darthsim/overmind/blob/master/README.md Allows Overmind to use a specified tmux configuration file, enabling differentiation from your main tmux window. This is useful for custom status lines or different prefix keys within the Overmind session. ```bash overmind start -F ~/overmind.tmux.conf ``` ```bash OVERMIND_TMUX_CONFIG=~/.overmind.tmux.conf overmind start ``` -------------------------------- ### Run Only Specified Processes with Overmind Source: https://github.com/darthsim/overmind/blob/master/README.md Shows how to limit Overmind to run only a subset of processes defined in the `Procfile`. Processes can be selected by listing their names via a command-line flag or an environment variable. ```bash $ overmind start -l web,sidekiq ``` ```bash $ OVERMIND_PROCESSES=web,sidekiq overmind start ``` -------------------------------- ### Customize Overmind Process Output Colors Source: https://github.com/darthsim/overmind/blob/master/README.md Shows how to specify custom xterm color codes for process names in Overmind's output. This allows for better integration with different terminal color schemes and improved readability. ```bash $ overmind start -b 123,123,125,126,127 ``` ```bash $ OVERMIND_COLORS=123,123,125,126,127 overmind start ``` -------------------------------- ### Build All Overmind Gems Source: https://github.com/darthsim/overmind/blob/master/packaging/rubygems/RELEASING.md Executes a Rake task to build Overmind gems for all supported platforms, including Linux, macOS, and FreeBSD. This command leverages RubyGems enhancements in Ruby 3.0+ for multi-platform gem generation. ```bash rake "overmind:build:all" ``` -------------------------------- ### Restart Overmind Processes Source: https://github.com/darthsim/overmind/blob/master/README.md Restarts one or more specified Overmind processes without affecting others. Supports single process names, multiple names, or wildcard patterns. If no arguments are provided, all processes managed by Overmind will be restarted. ```bash $ overmind restart sidekiq ``` ```bash $ overmind restart sidekiq assets ``` ```bash $ overmind restart 'sidekiq*' ``` ```bash $ overmind restart ``` -------------------------------- ### Allow Specific Overmind Processes to Die Gracefully Source: https://github.com/darthsim/overmind/blob/master/README.md Shows how to designate processes that can terminate without causing Overmind to interrupt all other running processes. This can be configured for specific processes or for all processes. ```bash $ overmind start -c assets,npm_install ``` ```bash $ OVERMIND_CAN_DIE=assets,npm_install overmind start ``` ```bash $ overmind start --any-can-die ``` ```bash $ OVERMIND_ANY_CAN_DIE=1 overmind start ``` -------------------------------- ### Restart a single Overmind process Source: https://github.com/darthsim/overmind/blob/master/packaging/rubygems/README.md Command to restart a specific process managed by Overmind without affecting other running processes, useful for applying changes to a single component. ```bash bin/overmind restart sidekiq ``` -------------------------------- ### Workaround for Docker Process Stopping Issue Source: https://github.com/darthsim/overmind/blob/master/README.md Provides a solution for Docker processes that do not stop properly when `SIGINT` is sent. This workaround involves adding a `trap` command within the Procfile to explicitly stop a named Docker container upon process exit, ensuring clean shutdown. ```procfile mydocker: trap 'docker stop mydocker' EXIT > /dev/null; docker run --name mydocker ... ``` -------------------------------- ### Display Timestamps in Overmind Output Source: https://github.com/darthsim/overmind/blob/master/README.md Explains how to configure Overmind to add timestamps to its output. This is particularly useful when the managed processes themselves do not provide timestamps in their logs. ```bash $ overmind start -T ``` ```bash $ OVERMIND_SHOW_TIMESTAMPS=1 overmind start ``` -------------------------------- ### Stop a single Overmind process Source: https://github.com/darthsim/overmind/blob/master/packaging/rubygems/README.md Command to stop a specific process managed by Overmind without stopping other running processes, allowing granular control over your application's components. ```bash bin/overmind stop sidekiq ``` -------------------------------- ### Specify Overmind TCP Network Address Source: https://github.com/darthsim/overmind/blob/master/README.md Configures Overmind to bind its command center to a TCP address and port, enabling remote access. This is particularly useful when running Overmind on a remote machine. The same TCP address and network type must be passed to all subsequent Overmind commands. ```bash $ overmind start -s "0.0.0.0:4321" -S "tcp" ``` ```bash $ OVERMIND_SOCKET="0.0.0.0:4321" OVERMIND_NETWORK="tcp" overmind start ``` ```bash $ overmind connect -s "0.0.0.0:4321" -S "tcp" web ``` -------------------------------- ### Kill All Overmind Processes Source: https://github.com/darthsim/overmind/blob/master/README.md Immediately terminates all currently running processes managed by Overmind. This command is useful for quickly shutting down all active processes in case of issues or when a full reset is needed. ```bash $ overmind kill ``` -------------------------------- ### Stop Overmind Processes Source: https://github.com/darthsim/overmind/blob/master/README.md Stops one or more specified Overmind processes. This command supports stopping individual processes, multiple processes by name, or processes matching a wildcard pattern. When called without arguments, it will stop all processes without stopping Overmind itself. ```bash $ overmind stop sidekiq ``` ```bash $ overmind stop sidekiq assets ``` ```bash $ overmind stop 'sidekiq*' ``` ```bash $ overmind stop ``` -------------------------------- ### Disable Automatic PORT Assignment in Overmind Source: https://github.com/darthsim/overmind/blob/master/README.md Explains how to prevent Overmind from automatically setting the `PORT` environment variable for processes. This is useful when processes manage their own port assignments. ```bash $ overmind start -N ``` ```bash $ OVERMIND_NO_PORT=1 overmind start ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.