54 lines
1.1 KiB
PHP
54 lines
1.1 KiB
PHP
<?php
|
|
namespace Deployer;
|
|
|
|
require 'recipe/laravel.php';
|
|
set('keep_releases', 20);
|
|
|
|
set('http_user', 'panelmy');
|
|
//set('writable_use_sudo', true);
|
|
|
|
// Project name
|
|
set('application', '/home/panel.mydentalbackup.co.uk/public_html');
|
|
|
|
// Project repository
|
|
set('repository', 'git@git.nabble.co.uk:mshillam/mdbpanel.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', ['current']);
|
|
set('allow_anonymous_stats', false);
|
|
|
|
// Hosts
|
|
|
|
host('192.168.20.7')
|
|
->set('deploy_path', '{{application}}');
|
|
|
|
// Tasks
|
|
|
|
task('build', function () {
|
|
run('cd {{release_path}} && build');
|
|
});
|
|
|
|
/**
|
|
* Chown files to correct user
|
|
*/
|
|
//task('deploy:chown', function () {
|
|
// run('chown -R panelmy:panelmy ' . get('deploy_path'));
|
|
//});
|
|
|
|
// [Optional] if deploy fails automatically unlock.
|
|
after('deploy:failed', 'deploy:unlock');
|
|
|
|
|
|
// Migrate database before symlink new release.
|
|
|
|
//before('deploy:symlink', 'deploy:chown');
|
|
before('deploy:symlink', 'artisan:migrate');
|
|
|