LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

foreman

process manager for Procfile-based applications

TLDR

Start every process in the Procfile
$ foreman start
copy
Start one process type
$ foreman start [web]
copy
Use a Procfile somewhere else
$ foreman start --procfile [path/to/Procfile]
copy
Load the environment from a specific file
$ foreman start --env [path/to/.env]
copy
Run from another directory
$ foreman start --directory [path/to/app]
copy
Scale the process types
$ foreman start --formation "[web=3,worker=2]"
copy
Run everything except the workers
$ foreman start --formation "[all=1,worker=0]"
copy
Choose the base port the processes get
$ foreman start --port [3000]
copy
Check that the Procfile parses
$ foreman check
copy
Run a one-off command with the app's environment
$ foreman run [command]
copy
Export the Procfile as systemd units
$ foreman export systemd [path/to/output] --app [myapp]
copy

SYNOPSIS

foreman command [options]

DESCRIPTION

foreman is a process manager for Procfile-based applications. It reads a Procfile that declares the processes that comprise your application and runs them in development, making it easy to manage multiple processes.A Procfile defines process types as lines with format name: command. For example: web: python app.py and worker: python worker.py. Foreman starts all defined processes and forwards their output to the terminal.Foreman also loads environment variables from .env files and can export process definitions to system init formats like systemd, upstart, or launchd for production deployment.

PARAMETERS

start

Start all processes defined in the Procfile
check
Validate Procfile format
run
Run a one-off command using the app's environment
export
Export processes to another format (systemd, upstart, etc.)
-f, --procfile FILE
Specify an alternate Procfile
-d, --root DIR
Specify an alternate application root
-e, --env FILE
Specify environment file(s) to load
-m, --formation SPEC
Specify process formation (e.g., web=2,worker=1)
-p, --port PORT
Specify starting port number
-t, --timeout SECONDS
Specify shutdown timeout

CONFIGURATION

Procfile

Defines process types as name:command lines (e.g., web: python app.py).
.env
Environment variables loaded automatically by foreman.

INSTALL

brew install foreman
copy
nix profile install nixpkgs#foreman
copy

CAVEATS

foreman is primarily designed for development environments. For production, export to a proper process manager. Port assignment is sequential starting from the -p value, which may conflict with existing services.

HISTORY

foreman was created by David Dollar at Heroku in 2011 as a way to manage Procfile-based applications locally. The Procfile format became a standard for defining process types in twelve-factor applications and is used by many PaaS providers.

SEE ALSO

pm2(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid