Skip to content

Instantly share code, notes, and snippets.

@DarkGhostHunter
Last active August 2, 2019 01:51
Show Gist options
  • Save DarkGhostHunter/929197e3c84846e0a26361f3734ab491 to your computer and use it in GitHub Desktop.
Save DarkGhostHunter/929197e3c84846e0a26361f3734ab491 to your computer and use it in GitHub Desktop.
@servers(['web' => ['[email protected]'] ]);
@setup
$current_dir = '/srv/www/project';
@endsetup
@story('deploy')
install
optimize
publish
enable
@endstory
@task('install', ['on' => 'web'])
cd {{ $current_dir }}
composer install --no-dev --no-suggest
npm update
@endtask
@task('optimize', ['on' => 'web'])
cd {{ $current_dir }}
php artisan config:cache
php artisan route:cache
composer dump-autoload --optimize --no-dev
@endtask
@task('publish', ['on' => 'web'])
cd {{ $current_dir }}
php artisan vendor:publish --tag=public --force
npm run production
@endtask
@task('restrict', ['on' => 'web'])
cd {{ $current_dir }}
sudo chown www-data:www-data ./
sudo chmod -R 750 ./
@endtask
@task('enable', ['on' => 'web'])
cd {{ $current_dir }}
sudo chown www-data:www-data storage bootstrap
sudo chmod -R u+rwX,go+rX,go-w storage bootstrap
@endtask
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment