6
0
Fork 0

测试环境发布脚本

release
李静 2021-12-09 17:45:48 +08:00
parent b0e7957550
commit 365919306b
1 changed files with 45 additions and 0 deletions

45
deploy.php 100644
View File

@ -0,0 +1,45 @@
<?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');