欢迎访问 生活随笔!

凯发k8官方网

当前位置: 凯发k8官方网 > 编程语言 > php >内容正文

php

deploy.php -凯发k8官方网

发布时间:2023/12/10 php 166 豆豆
凯发k8官方网 收集整理的这篇文章主要介绍了 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

总结

以上是凯发k8官方网为你收集整理的deploy.php的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得凯发k8官方网网站内容还不错,欢迎将凯发k8官方网推荐给好友。

  • 上一篇:
  • 下一篇:
网站地图