aaronbauman/terminus-config-export
Composer 安装命令:
composer require aaronbauman/terminus-config-export
包简介
Terminus plugin for syncing Drupal site configuration
README 文档
README
cex
Remotely push active config into version control
Why do we need this?
This command wraps the sub-commands for a typical on-server config sync -- switching to SFTP, dumping, commiting, and switching back to git -- in a single command. The best part is that each subcommand waits for the previous command to finish, to avoid convergence problems.
Usage
terminus cex site.env [--message="Optional commit message"]
cexr
Export active config from a remote environment to local
Why do we need this?
For a CI site, we can't do on-server commits - we need to send them to a completely different repository. Drush offers a way to export active config within the same site, or to sync staged config between two sites. The missing piece is exporting active config from one environment to another, especially a local working directory which may not be bootstrappable. This command makes that bridge, and addresses the common use case of more easily fetching "Config from prod".
NB: be sure to use the --destination flag if you're not in a working drupal environment
terminus cexr site.env [--destination="Optional local destination"]
Installation
Depending on which version of Terminus you have installed, install the plugin by using one of the following commands. You can see which version of Terminus you're using by executing terminus --version.
Terminus 2
composer create-project --no-dev -d ~/.terminus/plugins aaronbauman/terminus-config-export
Terminus 3
terminus self:plugin:install aaronbauman/terminus-config-export
Under the hood
What happens when I run cex?
Together with Drush, the Terminus plugin will:
- Check for difference between active and staged config (
drush cst). - If there's a difference, put the target environment into SFTP mode.
- Run
drush cexremotely to export config. - Commit the config changes to VCS.
- Put the site back into git mode.
What happens when I run cexr?
- Create a private directory in the remote environment (given by
--remote-destinationoption) - Run
drush cexremotely to export config to the given directory. rsyncthe config to the local environment, as determined by--destinationoption
aaronbauman/terminus-config-export 适用场景与选型建议
aaronbauman/terminus-config-export 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 649 次下载、GitHub Stars 达 4, 最近一次更新时间为 2021 年 02 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 aaronbauman/terminus-config-export 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 aaronbauman/terminus-config-export 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 649
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 21
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-02-23