Skip to content

Instantly share code, notes, and snippets.

@sasafister
Created May 11, 2022 16:37
Show Gist options
  • Save sasafister/792ffb2250b658647ce9e8100b0b9cad to your computer and use it in GitHub Desktop.
Save sasafister/792ffb2250b658647ce9e8100b0b9cad to your computer and use it in GitHub Desktop.
<?php
namespace Deployer;
require 'recipe/laravel.php';
// Project name
set('application', 'tennis');
// Project repository
set('repository', 'git@gitlab.com:sashafishter/tennis.git');
// [Optional] Allocate tty for git clone. Default value is false.
set('git_tty', true);
// Shared files/dirs between deploys
add('shared_files', []);
add('shared_dirs', []);
// Writable dirs by web server
add('writable_dirs', []);
// Hosts
host('production')
->hostname('sliceer.com')
->user('darko')
->port('17000')
->configFile('~/.ssh/config')
->forwardAgent(true)
->set('deploy_path', '/var/www/html/tennis')
->set('branch', 'v2_master');
host('develop')
->hostname('dev.sliceer.net')
->user('darko')
->port('17000')
->configFile('~/.ssh/config')
->forwardAgent(true)
->set('deploy_path', '/var/www/html/tennis_develop')
->set('branch', 'develop');
/*// build assets
task('npm-run-prod', function () {
run('npm install');
run('npm run prod');
})->local();
before('deploy:prepare', 'npm-run-prod');*/
// Tasks
before('deploy:symlink', 'deploy:public_disk');
// [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');
// Migrate database before symlink new release.
before('deploy:symlink', 'artisan:migrate');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment