PHP code example of bytic / deployer-recipies

1. Go to this page and download the library: Download bytic/deployer-recipies 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/ */

    

bytic / deployer-recipies example snippets




namespace Deployer;

yer-recipies/recipies/bytic.php';

set('application', 'my-app');
set('repository', '[email protected]:my-org/my-app.git');

host('production')
    ->set('hostname', 'example.com')
    ->set('remote_user', 'deploy')
    ->set('deploy_path', '/var/www/my-app');



set('cloudflare', [
    'api_token' => getenv('CF_API_TOKEN'), // preferred
    // or: 'email' + 'api_key'
    // or: 'service_key'
    'domain' => 'example.com',
]);

after('deploy:success', 'deploy:cloudflare');



set('supervisor_source_dir', 'etc/supervisor');       // local dir with .conf files
set('supervisor_remote_dir', '/etc/supervisor/conf.d'); // remote target dir
set('supervisor_config_filename', 'my-app-prod.conf');
set('supervisor_excluded_files', ['dev-worker.conf']); // optional exclusions
set('supervisor_sudo', true);                          // use sudo for supervisorctl



set('slack_webhook', getenv('SLACK_WEBHOOK'));

before('deploy', 'slack:notify');
after('deploy:success', 'slack:notify:success');
after('deploy:failed', 'slack:notify:failure');



// Create a task that runs a bytic command:
task('my:task', bytic('my:command', ['showOutput']));