Skip to content

Instantly share code, notes, and snippets.

@phcostabh
Created April 26, 2019 13:05
Show Gist options
  • Save phcostabh/937dd3771163543d80f26ef627b99e6f to your computer and use it in GitHub Desktop.
Save phcostabh/937dd3771163543d80f26ef627b99e6f to your computer and use it in GitHub Desktop.
<?php
require_once 'recipe/common.php';
set('keep_releases', 5);
server('staging', 'staging.chatfood.io', 22)
->user('forge')
->identityFile()
->stage('staging')
->env('branch', 'staging')
->env('deploy_path', '/home/forge/staging.chatfood.io');
set('repository', '[email protected]:chatfood/chatfood-api.git');
/**
* Setup the environment file in the new release
*/
task('environment', function () {
run('cp /home/forge/staging.chatfood.io/shared/.env {{release_path}}/.env');
})->desc('Environment setup');
// Laravel writable dirs
set('writable_dirs', ['storage', 'vendor']);
/**
* Main task
*/
task('deploy', [
'deploy:prepare',
'deploy:release',
'deploy:update_code',
'deploy:vendors',
'deploy:symlink',
'cleanup',
'environment',
])->desc('Deploy your project');
after('deploy', 'success');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment