承接 floriankarsten/simple-staging 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

floriankarsten/simple-staging

Composer 安装命令:

composer require floriankarsten/simple-staging

包简介

README 文档

README

Plugin for very simple staging setup for https://github.com/bnomei/kirby3-janitor/ (required). Beta quality - use at your own risk. It's working without problems for me but any comments and suggestions for improvements are welcome. There are two variants pure php and rsync.

Requirements

Plugin assumes flat structure and while you can define the destination (live site) as you want i would suggest structure like

websites/
	staging.mysite.com
	mysite.com

PHP job vs Rsync job

Both jobs are different. The PHP job should be more compatible but it naive, takes longer, it alwyas copies everything and it requires you to have space for 3 versions of your site. It works like this

  1. Copy staging.mysite.com to __staging_mysite.com
  2. Rename mysite.com to __tobedeleted_mysite.com
  3. Rename __staging_mysite.com to mysite.com
  4. Delete __tobedeleted_mysite.com

Rsync job requires you to have rsync available on your server but it syncs changes from staging to live directly. This makes it much more efficient and you have only 2 versions of site at the time. Rsync also has better include/exclude options. Many shared hostings with ssh have rsync available but check if you allow php to run exec();.

You probably want to use Rsync job if you can.

Install

composer require floriankarsten/simple-staging

config.php

// Required loads the jobs
'bnomei.janitor.jobs-extends' => [
	'floriankarsten.simplestaging.jobs'
],
// this is required name of final destination of website
// for example if i have site folders staging.test.com and test.com i set test.com as destination
'floriankarsten.simplestaging' => [
	'destination' => 'test.com',
	'base' => '/users/floriankarsten/bestwebsite/' // Not required. Absolute path to base of our website. By default its parent of index/public folder which is what you probably want.
]

In your blueprint

// PHP job
pushlive:
  type: janitor
  label: Deploy to Live site rsync
  progress: Deploying...
  job: deploylive

// Rsync job
pushlive:
  type: janitor
  label: Deploy to Live site rsync
  progress: Deploying...
  job: deployliversync

Configuration PHP job

'floriankarsten.simplestaging' => [
	'basic' => [ // 'basic' is namespace for our 'php job'
		'excludedir' => ['vendor', 'node_modules'] // basic job can only exclude directories. Empty by default.
	],
]

Configuration Rsync job

'floriankarsten.simplestaging' => [
	'rsync' => [
		'executable' => '/usr/lib/rsync' // path to rsync library. Default 'rsync'
		'flags' => ['a', 'r'] // overwrite default rsync flags. Default ['a', 'r']
		// include/exclude work as if they were passed directly to rsync (so things like *.jpg etc.). If you use only include without exclude we assume and exclude '*'
		'exclude' => ['vendor', 'node_modules'], // Empty by default.
		'include' => ['content'], // Empty by default.
	],
]

This plugin wouldn't happen without @garethworld who kindly hired me to make it and then wanted to have it released to Kirby community. Thanks GARETH

floriankarsten/simple-staging 适用场景与选型建议

floriankarsten/simple-staging 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 23 次下载、GitHub Stars 达 9, 最近一次更新时间为 2021 年 06 月 17 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 floriankarsten/simple-staging 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 9
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-06-17