PHP code example of mjaschen / deployer-tasks

1. Go to this page and download the library: Download mjaschen/deployer-tasks library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mjaschen / deployer-tasks example snippets




namespace Deployer;

p';

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');

set('supervisord_service_names', []);
set('supervisorctl_use_sudo', true);
set('supervisorctl_command', 'supervisorctl');

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');

set('systemd_service_names', []);
set('systemd_systemctl_use_sudo', true);
set('systemd_systemctl_command', 'systemctl');