|
NAMEforeman - manage Procfile-based applicationsSYNOPSISforeman start [process]foreman run <command> foreman export <format> [location] DESCRIPTIONForeman is a manager for Procfile-based applications. Its aim is to abstract away the details of the Procfile format, and allow you to either run your application directly or export it to some other process management format.RUNNINGforeman start is used to run your application directly from the command line.If no additional parameters are passed, foreman will run one instance of each type of process defined in your Procfile. If a parameter is passed, foreman will run one instance of the specified application type. The following options control how the application is run:
foreman run is used to run one-off commands using the same environment as your defined processes. EXPORTINGforeman export is used to export your application to another process management format.A location to export can be passed as an argument. This argument may be either required or optional depending on the export format. The following options control how the application is run:
GLOBAL OPTIONSThese options control all modes of foreman´s operation.
EXPORT FORMATSforeman currently supports the following output formats:
INITTAB EXPORTWill export a chunk of inittab-compatible configuration:
SYSTEMD EXPORTWill create a series of systemd scripts in the location you specify. Scripts will be structured to make the following commands valid:systemctl start appname.target systemctl stop appname-processname.target systemctl restart appname-processname-3.service UPSTART EXPORTWill create a series of upstart scripts in the location you specify. Scripts will be structured to make the following commands valid:start appname stop appname-processname restart appname-processname-3 PROCFILEA Procfile should contain both a name for the process and the command used to run it.
A process name may contain letters, numbers and the underscore character. You can validate your Procfile format using the check command:
The special environment variables $PORT and $PS are available within the Procfile. $PORT is the port selected for that process. $PS is the name of the process for the line. The $PORT value starts as the base port as specified by -p, then increments by 100 for each new process line. Multiple instances of the same process are assigned $PORT values that increment by 1. ENVIRONMENTIf a .env file exists in the current directory, the default environment will be read from it. This file should contain key/value pairs, separated by =, with one key/value pair per line.
DEFAULT OPTIONSIf a .foreman file exists in the current directory, default options will be read from it. This file should be in YAML format with the long option name as keys. Example:
EXAMPLESStart one instance of each process type, interleave the output on stdout:
Export the application in upstart format:
Run one process type from the application defined in a specific Procfile:
Start all processes except the one named worker:
COPYRIGHTForeman is Copyright (C) 2010 David Dollar http://daviddollar.org
Visit the GSP FreeBSD Man Page Interface. |