mikevrind/deployer
Composer 安装命令:
composer require mikevrind/deployer
包简介
Easy deployer for web projects using Gitlab
README 文档
README
Use this package to automate the deployment process of your Laravel project that are hosted on Gitlab. Just follow the installation instructions. Don't forget to check the configuration file for the deployment options!
Installation
Require this package with composer:
composer require mikevrind/deployer
After updating composer, add the DeployerServiceProvider to the providers array in config/app.php
MikeVrind\Deployer\DeployerServiceProvider::class,
Configuration
The setup of the deployer can (and should be) changed by publishing the configuration file.
You should use Artisan to copy the default configuration file from the /vendor directory to /config/deployer.php with the following command:
php artisan vendor:publish --provider="MikeVrind\Deployer\DeployerServiceProvider"
It's advised to define the settings via your .env file so that it's possible to change the behavior of the deployer per environment
CSRF Token
Update the VerifyCsrfToken middleware by adding '_deployer/deploy' to the $except array.
Without this exception, all webhooks will fail because of a missing token in each request.
.env setup
Add the following lines to your .env(.example) file. The DEPLOYER_REMOTE_* settings are used to establish a CLI connection with the server.
DEPLOYER_ENABLED=true
DEPLOYER_MAIL_ENABLED=true
DEPLOYER_REPO_BRANCH=
DEPLOYER_REPO_PROJECT_ID=
DEPLOYER_REPO_REPOSITORY=
DEPLOYER_REMOTE_HOST=
DEPLOYER_REMOTE_USER=
DEPLOYER_REMOTE_PWD=
DEPLOYER_REMOTE_KEY=
DEPLOYER_REMOTE_KEYTEXT=
DEPLOYER_REMOTE_KEYPHRASE=
DEPLOYER_REMOTE_TIMEOUT=
Settings
DEPLOYER_ENABLED (default; false)
Determines if the deployer should be enabled for this environment
DEPLOYER_MAIL_ENABLED (default; false)
Determines if after deployment has been completed a mail should be send to the configured recipients
DEPLOYER_REPO_BRANCH (default; master)
Determines to which branch the deployer should listen to when the web hook is fired
DEPLOYER_REPO_PROJECT_ID (default; 1)
Determines to which project ID the deployer should listen to when the web hook is fired
DEPLOYER_REPO_REPOSITORY (default; git@git.domain.tld/group/project.git)
Determines to which project ID the deployer should listen to when the web hook is fired
DEPLOYER_REMOTE_HOST (default; '')
Determines to which HOST the SSH connection should be established
DEPLOYER_REMOTE_USER (default; '')
Determines the user that should be used for the SSH connection
DEPLOYER_REMOTE_PWD (optional, default; '')
Determines the password for the user that should be used for the SSH connection
DEPLOYER_REMOTE_KEY (optional, default; '')
Determines the public_key filename for the user that should be used for the SSH connection
DEPLOYER_REMOTE_KEYTEXT (optional, default; '')
Determines the public_key for the user that should be used for the SSH connection
DEPLOYER_REMOTE_KEYPHRASE (optional, default; '')
Determines the password for the public_key
DEPLOYER_REMOTE_TIMEOUT (default; 120)
Determines how long the connection should wait for your commands. Settings this to 0 will wait indefinitely for your command to finish.
Webhook configuration
Open your project and go to Settings -> Web hooks. This package listens to the _deployer/deploy route.
So add something like http(s)://www.domain.tld/_deployer/deploy as the URL.
In most cases, the Push events trigger will be oke to use. Now add the new webhook and you're done!
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any (security related) issues, please create an issue in the the issue tracker.
License
The MIT License (MIT). Please see License File for more information.
mikevrind/deployer 适用场景与选型建议
mikevrind/deployer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 845 次下载、GitHub Stars 达 1, 最近一次更新时间为 2015 年 12 月 28 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「gitlab」 「deployer」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mikevrind/deployer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mikevrind/deployer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mikevrind/deployer 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Deployer.org based deployment for Symfony4 with media and database synchronisation.
blueways deployer recipes
PHP GitLab generic API client (not stick to any version)
A collection of monolog handlers using PSR-18 http client
A Highly Opinionated Symfony3/4 Deployer Recipe
Composer based WordPress deployment with deployer.org.
统计信息
- 总下载量: 845
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-12-28