bretrzaun / deployment-command
Console-Command to deploy an application to (multiple) servers
Installs: 869
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/bretrzaun/deployment-command
Requires
- php: >=7.2.5
- ext-json: *
- laravel/envoy: ^1.2
- symfony/console: ^4.0|^5.0
- symfony/options-resolver: ^4.0|^5.0
- symfony/process: ^4.0|^5.0
Requires (Dev)
- phpunit/phpunit: ^8.0
- symfony/var-dumper: ^5.0
This package is auto-updated.
Last update: 2025-10-28 23:01:54 UTC
README
Symfony Console command to deploy an application to remote server(s).
Installation
Install via Composer:
composer require bretrzaun/deployment-command
Configuration
For each environment create a configuration file named like the environment.
The nodes must be accessible via SSH-based authentication or a keyfile can be given.
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:
script-timeout
Process timeout in seconds for each local script. Default value: 120 seconds
sync-timeout
Process timeout in seconds for sync. Default value: 300 seconds
Usage
Register the console command to a Symfony console application:
$console->add(new DeploymentCommand('path/to/config-folder/'));