Last active
August 2, 2019 01:51
-
-
Save DarkGhostHunter/929197e3c84846e0a26361f3734ab491 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @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