6
0
Fork 0
jiqu-library-server/deploy.php

46 lines
1.0 KiB
PHP

<?php
namespace Deployer;
require 'recipe/laravel.php';
// Project name
set('application', 'my_project');
// Project repository
set('repository', 'git@gitee.com:zi-chunsheng-e-commerce/mall-server.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('test.zichunsheng.cn')
->user('deployer')
->port(22)
->identityFile('~/.ssh/deployer_rsa')
->forwardAgent(true)
->multiplexing(true)
->addSshOption('UserKnownHostsFile', '/dev/null')
->addSshOption('StrictHostKeyChecking', 'no')
->stage('test')
->set('branch', 'develop')
->set('deploy_path', '/www/wwwroot/test.zichunsheng.cn');
// Tasks
// [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');
// Migrate database before symlink new release.
before('deploy:symlink', 'artisan:migrate');