PHP code example of foodkit / laravel-deployer

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

    

foodkit / laravel-deployer example snippets




namespace Deployer;

type', 'native');
set('ssh_multiplexing', true);
set('branch', 'production');
set('repository', '[email protected]:company/project.git');

// Servers
server('production', '1.2.3.4')
    ->user('root')
    ->identityFile()
    ->set('deploy_path', '/var/www/project');


set('standalone', true);

set('migration', false);


option('start', null, InputOption::VALUE_OPTIONAL, 'The start tag/branch');
option('end', null, InputOption::VALUE_OPTIONAL, 'The end tag/branch');

set('slack_title', 'Release notes');
set('slack_color', '#4d91f7');
set('slack_emoji', ':ghost:');
set('slack_name', 'Laravel Deployer');
set('slack_webhook', 'https://hooks.slack.com/services/ABCDEFGH/IJLMNOPQ/OJI7OA9IU1BAJgGj4ge3YD9A');
set('release_notes_command', 'vendor/bin/release-notes generate');


option('start', null, InputOption::VALUE_OPTIONAL, 'The start tag/branch');
option('end', null, InputOption::VALUE_OPTIONAL, 'The end tag/branch');

set('api_endpoint', 'https://api.product.com');

after('deploy', 'slack:send-release-notes-api');
sh
php vendor/bin/dep deploy production
sh
php vendor/bin/dep deploy production --tag="v0.1"
php vendor/bin/dep deploy production --branch="develop"
sh
php vendor/bin/dep hotfix production
sh
php vendor/bin/dep release production