1 Star 0 Fork 0

视迅速达/fiberDemo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
deploy.php 1.89 KB
一键复制 编辑 原始数据 按行查看 历史
陈圣文 提交于 2021-02-19 15:40 . auto commit by deploy
<?php
namespace Deployer;
require 'recipe/common.php';
// Project name
set('application', 'fiber_demo');
// Project repository
set('repository', 'https://gitee.com/subowen_admin/fiber_demo.git');
// [Optional] Allocate tty for git clone. Default value is false.
set('git_tty', true);
// Shared files/dirs between deploys
set('shared_files', []);
set('shared_dirs', []);
// Writable dirs by web server
set('writable_dirs', []);
set('allow_anonymous_stats', false);
set('default_stage', 'local');
// Hosts
localhost()
->stage('local')
->roles('test', 'build');
host('test-ark001', 'test-ark002', 'test-ark003')
->configFile('~/.ssh/config')
->stage('prod')
->set('deploy_path', '/hwdata/www/{{application}}');
// Tasks
task('git:push', function() {
writeln('start git push task');
run('git add .');
run('git commit -m "auto commit by deploy"');
run('git push origin master');
});
desc('go version');
task('go:version', function() {
run('whoami && pwd');
run('/usr/local/go/bin/go version');
});
desc('go build current dir project');
task('go:build', function() {
run('cd {{release_path}} && /usr/local/go/bin/go build .');
});
desc('go build current dir and restart supervisrod');
task('go:restart', function() {
run('cd {{release_path}} && /usr/local/go/bin/go build .');
run('cd {{release_path}} && chmod +x ./fiberDemo');
run('sudo supervisorctl restart fiber_demo', ['tty' => true]);
});
desc('Deploy your project');
task('deploy', [
'deploy:info',
'deploy:prepare',
'deploy:lock',
'deploy:release',
'deploy:update_code',
'deploy:shared',
'deploy:writable',
// 'deploy:vendors',
// 'deploy:clear_paths',
// 'deploy:symlink',
'deploy:unlock',
// 'cleanup',
'success'
]);
// [Optional] If deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');
after('deploy:writable', 'go:restart');
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/subowen_admin/fiber_demo.git
git@gitee.com:subowen_admin/fiber_demo.git
subowen_admin
fiber_demo
fiberDemo
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385