bretrzaun / deployment-command
Console-Command to deploy an application to (multiple) servers
0.3.0
2020-06-28 09:46 UTC
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: 2024-10-28 20:49:49 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/'));