positivecodes/deployer
Composer 安装命令:
composer require positivecodes/deployer
包简介
GIT/SVN deployer for Yii 2 apps.
README 文档
README
Deploys SVN/GIT version of Yii 2 project
SYNOPSIS
deployer -d TAG [-v] [-s] [-e ENV]
deployer -r TAG [-v] [-e ENV]
deployer -dev [-v] [-s] [-e ENV]
deployer -b BRANCH [-v] [-s] [-e ENV]
deployer -h
deployer -c
deployer -u
LOCAL INSTALLATION
Copy deployer to the project folder.
GLOBAL INSTALLATION
Run
composer global require positivecodes/deployer
and then
composer run-script post-update-cmd -d COMPOSER_VENDOR/positivecodes/deployer
where COMPOSER_VENDOR is the vendor composer folder. You can find it by running composer global config vendor-dir --absolute.
GLOBAL UPDATE
Run
deployer -u
CONFIGURATION
Run deployer -c to generate configuration file and set all variables there.
DESCRIPTION
Deploys the target TAG version of Yii 2 project or rollbacks to the target TAG version.
Creates the releases and composer folders. Deployed version is stored in the releases
folder under the TAG name. Composer folder stores the vendor folder with composer
dependencies. TAG version is SVN-imported or GIT-cloned using provided credentials.
Script deletes environments folder and runs migration.
If environment is set to Production composer runs with option --no-dev --optimize-autoloader.
Deployed or rollbacked version is symlinked to the Apache host target folder.
| option | alias | description |
|---|---|---|
| -d TAG | --deploy TAG | deploy TAG version |
| -r TAG | --rollback TAG | rollback to TAG version |
| -dev | deploy development version | |
| -b BRANCH | --branch BRANCH | deploy development version from BRANCH branch (no starting and ending trailers) |
| -v | --verbose | runs the script in verbose mode where output of svn, composer and init is visible |
| -s | --skipmigrate | skips the migration process |
| -e ENV | --env ENV | sets environment name ENV for init |
| -h | --help | help screen |
| -c | --config | creates (overwrites) deployer.cfg file |
| -u | --update | updates deployer using composer in global mode |
CONFIGURATION
Configuration can be stored in separate file deployer.cfg (in the same folder).
| name | description |
|---|---|
| HOST | Project folder name, this is virtual host target folder. |
| ENV | Environment name for Yii 2 init command (can be set with -e flag also). |
| REPO_TYPE | Repo type: GIT or SVN. |
| REPO_URL | URL of the repo server. |
| REPO_USER | Name of the repo user with read rights. |
| REPO_PASS | Repo password for REPO_USER. |
| DEV_BRANCH | Repo branch for development releases (no starting and ending trailers). |
| RIGHTS | Optional folder rights to be set (use chown syntax owner:group). |
| PROJECT | Project name (for display purposes only). |
EVENTS
The following events are available for additional scripts:
- BEFORE_START
- AFTER_END
- BEFORE_DOWNLOAD
- AFTER_DOWNLOAD
- BEFORE_DEPLOY
- AFTER_DEPLOY
- BEFORE_DEPLOYDEV
- AFTER_DEPLOYDEV
- BEFORE_INIT
- AFTER_INIT
- BEFORE_MIGRATE
- AFTER_MIGRATE
- BEFORE_UPDATE
- AFTER_UPDATE
- BEFORE_ROLLBACK
- AFTER_ROLLBACK
- BEFORE_INSTALL
- AFTER_INSTALL
- BEFORE_SWITCH
- AFTER_SWITCH
positivecodes/deployer 适用场景与选型建议
positivecodes/deployer 是一款 基于 Shell 开发的 Composer 扩展包,目前已累计 30 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 09 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 positivecodes/deployer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 positivecodes/deployer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 30
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-09-08