mjaschen / deployer-tasks
Fund package maintenance!
mjaschen
www.paypal.com/paypalme/mjaschen
Requires
- php: ^7.3 || ^8.0
Requires (Dev)
- deployer/deployer: ^7.0
- ergebnis/composer-normalize: ^2.28.0
README
composer require --dev mjaschen/deployer-tasks
Include the tasks in your deploy.php
:
<?php namespace Deployer; require 'recipe/common.php'; require 'systemd-service.php'; require 'supervisord-service.php';
supervisord Services
Manages (already registered) supervisord services.
Example: stopping services before deployment, starting services when updated files are in place; show service status afterwards:
set('supervisord_service_names', ['acme_worker']); // (optional) when supervisor command is not in $PATH: set('supervisorctl_command', '/opt/supervisor/supervisorctl'); before('deploy:prepare', 'supervisord-service:stop') after('deploy:symlink', 'supervisord-service:start') after('supervisord-service:start', function() { sleep(1); }); after('supervisord-service:start', 'supervisord-service:status');
Configuration
Alle possible configuration options with their default values:
set('supervisord_service_names', []); set('supervisorctl_use_sudo', true); set('supervisorctl_command', 'supervisorctl');
systemd Services
Manages (already registered) systemd services.
Example: stopping services before deployment, starting services when updated files are in place; show service status afterwards:
set('systemd_service_names', ['acme_worker.service']); before('deploy:prepare', 'systemd-service:stop') after('deploy:symlink', 'systemd-service:start') after('systemd-service:start', function() { sleep(1); }); after('systemd-service:start', 'systemd-service:status');
Configuration
Alle possible configuration options with their default values:
set('systemd_service_names', []); set('systemd_systemctl_use_sudo', true); set('systemd_systemctl_command', 'systemctl');