deploy.php
生活随笔
收集整理的這篇文章主要介紹了
deploy.php
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
<?php
namespace Deployer;require 'recipe/common.php';// Project name
set('application', 'tp_web');// Project repository
set('repository', '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('keep_releases', 15);// Hosts
host('localhost')->user('www-data')->set('branch', 'master')->set('deploy_path', '部署地址'); // Tasks
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'
]);task('moveConfig', function(){run('cp /home/workspace/files/config_master.php /www/current/application/config.php');
});task('moveDatabase', function(){run('cp /home/workspace/files/database_master.php /www/current/application/database.php');
});task('createRuntime', function(){run('mkdir /www/current/runtime');run('mkdir /www/current/runtime/cache');run('mkdir /www/current/runtime/log');run('mkdir /www/current/runtime/temp');run('mkdir /www/current/runtime/tlogs');
});task('curl', function(){run('curl http://url/reset.php');run('curl http://url/reset.php');
});// [Optional] If deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');
after('deploy:unlock', 'moveConfig');
after('moveConfig', 'moveDatabase');
after('moveDatabase', 'curl');
after('curl', 'createRuntime');
?
轉載于:https://www.cnblogs.com/dongbo/p/11237299.html
總結
以上是生活随笔為你收集整理的deploy.php的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Linux Centos7 离线安装do
- 下一篇: 基于C API的SQLite3基本数据库