|
- <?php
- namespace Deployer;
-
- require 'recipe/laravel.php';
-
- // Project name
- set('application', 'knockout-lite');
-
- // Project repository
- set('repository', 'git@git.mos6581.com:Knockout/Knockout-Lite.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', []);
- set('allow_anonymous_stats', false);
-
- // Hosts
- host('lite.knockout.chat')
- ->user('knockout')
- ->stage('production')
- ->set('deploy_path', '/srv/www/{{application}}/production');
-
- host('staging.lite.knockout.chat')
- ->user('knockout')
- ->stage('staging')
- ->set('deploy_path', '/srv/www/{{application}}/staging');
-
- // Tasks
- task('build', function() {
- run('cd {{release_path}} && build');
- });
-
- task('artisan:storage:link', function() {
- // override
- });
-
- task('artisan:view:cache', function() {
- // override
- });
-
- task('artisan:config:cache', function() {
- // override
- });
-
- task('artisan:optimize', function() {
- // override
- });
-
- task('artisan:migrate', function() {
- // override
- });
-
- // [Optional] if deploy fails automatically unlock.
- after('deploy:failed', 'deploy:unlock');
-
- // Migrate database before symlink new release.
- before('deploy:symlink', 'artisan:migrate');
|