infotechnohelp/deployer
Composer 安装命令:
composer require infotechnohelp/deployer
包简介
Lightweight deployer
README 文档
README
ENV
export DEPLOY_HOST='infotechnohelp.com'
export DEPLOY_HOST_USERNAME='virt01'
export DEPLOY_PRIVATE_KEY_PATH='C:/Users/phili/.ssh/zone_id_rsa'
export DEPLOY_PATH='domeenid/www.infotechnohelp.com/test'
export DEPLOY_GIT_PASSWORD='password'
Implementation 'deploy.php'
<?php
require_once('vendor/autoload.php');
$dotenv = new \Dotenv\Dotenv(__DIR__ . DIRECTORY_SEPARATOR . 'config');
$dotenv->overload();
$dotenv->required([
'DEPLOY_HOST', 'DEPLOY_HOST_USERNAME', 'DEPLOY_PRIVATE_KEY_PATH', 'DEPLOY_PATH', 'DEPLOY_GIT_PASSWORD',
]);
$config = [
'host' => getenv('DEPLOY_HOST'),
'hostUsername' => getenv('DEPLOY_HOST_USERNAME'),
'privateKeyPath' => getenv('DEPLOY_PRIVATE_KEY_PATH'),
'deployPath' => getenv('DEPLOY_PATH'),
'dirName' => null,
'gitRepositoryServer' => 'gitlab.com',
'gitRepositoryName' => 'protected-app-skeleton',
'gitUsername' => 'infotechnohelp',
'gitPassword' => getenv('DEPLOY_GIT_PASSWORD'),
'copyFiles' => [
['config/.env.test', 'config/.env',],
],
'permissions' => [
['777', 'bin/cake'],
],
];
$postCloneCommands = [
'composer install --no-progress --no-suggest --no-interaction --no-dev',
'cd webroot',
'npm install',
'cd ..',
'bin/cake locale js',
'bin/cake locale js ee_ET',
'bin/cake locale js ru_RU',
];
$ignoreBackup = (count($argv) > 1) ? filter_var($argv[1], FILTER_VALIDATE_BOOLEAN) : false;
(new \Infotechnohelp\Deployer\Deployer($config))->deploy($postCloneCommands, $ignoreBackup);
Terminal
php deploy.php <bool>(ignoreBackup)=false
i.e.
php deploy.php true
Notes
In case of php deploy.php, a backup of a current version will be created in <deployPath>/backup/<actualDirName>/<timestamp> (if project already exists)
If $config['dirName'] == null, it will become an actual directory name (project name)
infotechnohelp/deployer 适用场景与选型建议
infotechnohelp/deployer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 741 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 02 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 infotechnohelp/deployer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 infotechnohelp/deployer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 741
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-02-08