定制 sarfraznawaz2005/floyer 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sarfraznawaz2005/floyer

Composer 安装命令:

composer require sarfraznawaz2005/floyer

包简介

Simple deployment tool using git and FTP - especially useful for shared hosting.

README 文档

README

DISCLAIMER

This tool is not fully tested, use it at your own risk!

Currently works for my needs but if you find any bugs or something missing, please do send PR. Thanks

Introduction

Floyer is simple and fast deployment tool using git/svn and (S)FTP - especially useful for shared hosting.

To run deployment, just type this on terminal: php floyer deploy ini_file_to_use. See below for commands.

Screenshot

Main Window

Requirements

  • PHP >= 5.6
  • git added to PATH env (If using Git driver)
  • svn added to PATH env (If using Svn driver)
  • FTP and Zip PHP extensions (both ship with PHP and usually turned on)

Command Options

  • php floyer deploy ini_file_to_use --sync : Synchronize last local revision id with remote revision file.
  • php floyer deploy ini_file_to_use --history : List files deployed in previous deployment.
  • php floyer deploy ini_file_to_use --rollback : Rollback previous deployment.

The ini_file_to_use is ini server config file that you can create copying from given sample file floyer-sample.ini. For different servers, you need to create different ini config files. For example:

  • php floyer deploy staging.ini upload to staging server
  • php floyer deploy live.ini upload to live server

Note Because these ini config file contain server connection details, make sure to gitignore them in your project.

How it works

  • It stores revision/commit hash on the server in a file when deployment is started.
  • On next deployment, it compares local revision with remote one thereby able to deploy only the files changed between these two revisions.
  • Once it knows what files to upload, it creates zip archive of these files to be deployed on the server.
  • Rather than uploading each file individually (which is very slow process), it creates and uploads zip archive file to server where there is corresponding extract zip PHP script which extracts these files very fast. This script is also created and uploaded by Floyer.
  • After deployment is finished, zip archive and extract script is deleted automatically.

Deploying by uploading and extracting archive file not only makes deployment fast but also we don't have to worry about some permission issues or creating new directories and so on because extract script runs from server itself thereby avoiding these issues.

Current Limitations

  • Works with current main git branch only
  • Not fully tested especially rollback feature

Download

The phar version is present at dist/floyer.phar. Once you download it, copy it to your project and issue this command at terminal:

php floyer.phar deploy ini_file_to_use or if you rename floyer.phar to floyer:

php floyer deploy ini_file_to_use

Tip

If you only upload to single server or don't want to type ini_file_to_use again and again, you can create a file called floyer_default_server.txt in project root directory and in that file type ini file name you want to use as default then you can skip typing ini_file_to_use in commands like:

php floyer deploy

php floyer deploy --history

However, you can still use ini_file_to_use argument if you wish to upload to differnt server.

Extending

  • You can extend it by adding more connectors. Checkout existing connectors at src/Connectors
  • You can extend it by improving existing Svn and Git drivers. Checkout existing drivers at src/Drivers

Similar Project

License

This code is published under the MIT License. This means you can do almost anything with it, as long as the copyright notice and the accompanying license file is left intact.

sarfraznawaz2005/floyer 适用场景与选型建议

sarfraznawaz2005/floyer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 32 次下载、GitHub Stars 达 59, 最近一次更新时间为 2017 年 08 月 20 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「git」 「deploy」 「ftp」 「deployer」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 sarfraznawaz2005/floyer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 sarfraznawaz2005/floyer 我们能提供哪些服务?
定制开发 / 二次开发

基于 sarfraznawaz2005/floyer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 32
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 59
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 59
  • Watchers: 3
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-08-20