Deployment Command
, (*1)
Symfony Console command to deploy an application to remote server(s)., (*2)
Installation
Install via Composer:, (*3)
composer require bretrzaun/deployment-command
, (*4)
Configuration
For each environment create a configuration file named like the environment., (*5)
The nodes must be accessible via SSH-based authentication or a keyfile can be given., (*6)
Example
{
"server" : {
"nodes" : ["user@my-server"],
"keyfile": "/path-to/keyfile",
"target" : "/target-folder",
"scripts" : {
"pre-deploy-cmd" : [],
"post-deploy-cmd" : [
"command1",
"command2"
]
}
},
"scripts" : {
"pre-deploy-cmd" : [
"composer install --no-dev -o"
],
"post-deploy-cmd" : [
"composer install"
]
}
}
Options
In the options
section the following nodes can be defined:, (*7)
script-timeout
Process timeout in seconds for each local script. Default value: 120 seconds, (*8)
sync-timeout
Process timeout in seconds for sync. Default value: 300 seconds, (*9)
Usage
Register the console command to a Symfony console application:, (*10)
$console->add(new DeploymentCommand('path/to/config-folder/'));