rseon/deployr
Composer 安装命令:
composer require rseon/deployr
包简介
Simply copy files from source to destination.
README 文档
README
Simply copy files from source to destination using rsync.
Simple usage
- Create (and protect) a folder accessible from Internet (example :
_secure23x45). - Create a file (example :
deploy.php) and add this content :
require '../vendor/autoload.php'; // If installed with composer // require '../deployr/src/autoload.php'; // If installed without composer $deployr = new Deployr\Application('mysupersecretkey'); // Change the key ! $deployr->setOptions([ 'allowed_ip' => ['127.0.0.1', '::1', 'MY.SUP.ER.IP'], ]); $deployr->run();
- Access to
https://my-website.com/_secure23x45/deploy.php?access_key=mysupersecretkey, review files and publish them !
At first run, the database will be created and assets copied into new folder.
You will be asked to set the settings. Be careful with folder path and excluded files. By default, the following paths are excluded :
- The path of this tool (for example
/_secure23x45) /node_modules/and/vendor/(because of large amount of files.)
Notice
Don't use this tool for first deployment !
If you add folders or files in excluded paths, like storage path, it will not be created even thought it is necessary.
Installation
Pre-requisite : PHP 7, rsync and correct rights on folders.
With composer
composer install rseon/deployr
Add this line at start of your deployer file : require '../vendor/autoload.php';
Without composer
- Download this repository as ZIP
- Upload it on your server
- Dezip file at root of your project
- Add this line at start of your deployer file :
require '../deployr/src/autoload.php';
Methods
| Name | Description |
|---|---|
run() |
Run the application |
setOptions(array $options) |
Set options to the application |
Options
| Name | Description | Default |
|---|---|---|
access_key_name |
The name of the GET parameter | access_key |
allowed_ip |
Allow access for only these IP addresses | ['127.0.0.1', '::1'] |
Diving deeper
Localization
Feel free to add your translations into the src/i18n folder adding JSON file (named as your lang).
The format is simple : { "My string" : "My translated string" }
Then add it into the file src/i18n/available.json
rseon/deployr 适用场景与选型建议
rseon/deployr 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 06 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 rseon/deployr 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 rseon/deployr 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2019-06-14