This application can be used to launch one or more Imbo servers hosted by PHPs built in web server. This can come in handy for testing purposes, and can be used with Travis-CI when integrating clients for instance.
This application requires PHP-5.6 or greater.
First, install the package using Composer:
curl https://getcomposer.org/installer | php
php composer.phar create-project -n imbo/imbolauncher imbolauncher dev-develop
then, execute the binary for more information:
cd imbolauncher
./bin/imbolauncher
You can also install the package by simply cloning it:
git clone https://github.com/imbo/imbolauncher.git
cd imbolauncher
curl https://getcomposer.org/installer | php
php composer.phar install
and then executing the binary:
./bin/imbolauncher
Below you will find the complete list of commands supported by ImboLauncher.
This command will start one or more servers based on your configuration file.
Path to the configuration file. For instance bin/imbolauncher start-servers --config config.json
. The configuration file uses JSON, and must follow the configuration file schema. Below is an example of such a config file:
{
"servers": [
{
"version": "dev-develop",
"host": "localhost",
"port": 9010,
"config": "imbo1.php"
},
{
"version": "2.2.1",
"host": "localhost",
"port": 9011,
"config": "imbo2.php"
}
]
}
The Imbo servers will be installed in this directory. Each server will be installed in a separate directory matching the version. If you use the above configuration file, and for instance /path/to/installations
as --install-path
the servers will be installed to:
/path/to/installations/dev-develop
/path/to/installations/2.2.1
Specify the amount of seconds each server is allowed to use when starting up. The default value is 2
.
Path to the file used to store the PIDs of the started servers. The default value is /tmp/imbolauncher-pids
.
./bin/imbolauncher start-servers --config config.json
./bin/imbolauncher start-servers --config config.json --timeout 1 --install-path /tmp/imbolauncher/installations --pid-file /tmp/imbolauncher/pids
This command can be used to kill the servers previously started by ImboLauncher. To do this you need to specify the path to the PID file you used when starting the servers.
Path to the file that holds the PIDs of the servers previously started with ImboLauncher. The command tries to figure out what the different PIDs refer to and present this to the user before continuing to kill the processes. After the processes have been killed the file referred to is deleted. The default value is /tmp/imbolauncher-pids
.
./bin/imbolauncher kill-servers
./bin/imbolauncher kill-servers --pid-file /path/to/pid/file