定制 orrison/cumulus 二次开发

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

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

orrison/cumulus

Composer 安装命令:

composer require orrison/cumulus

包简介

Import DNS records from Laravel Vapor into Cloudflare

README 文档

README

Total Downloads License

Cumulus is a package to be used with the Laravel Vapor CLI. It provides a set of commands to import DNS records for your Vapor custom domain into Cloudflare.

No more having to copy each manually which takes too long and is prone to errors. Cumulus will create any missing DNS records for you as well as update any incorrect or changed records.

Keep in mind that in order for the import to work the domain must be a custom domain in your Laravel Vapor team as well as a zone in your Cloudflare account already. This package will take care of importing the DNS records for you, not adding the domains.

You will also need to have Laravel Vapor CLI installed and authenticated on your machine.

Installation

composer global require orrison/cumulus --with-all-dependencies

Usage

Cloudflare Authentication

In order to use Cumulus, you will need a valid Cloudflare API Access Token. You can get one by following the instructions in their Documentation.

The "Edit DNS Zone" template is perfect for this. You will just need set the "Zone Resources" options to either All Zones or the correct option for your use case.

Once you have your token you can run the following command to input your token. It is then stored for use in future commands.

cumulus cloudflare:login

If, for what ever reason, you would like to clear this token from local storage then you can run the following command.

cumulus cloudflare:logout

Alternatively, if you wish to load your API token from your server environment, you can do so by declaring CLOUDFLARE_API_TOKEN as an environment variable. When this is defined it will always take priority over your Cumulus config stored in your user profile.

Importing DNS Records

Cumulus directly executes some commands via Laravel Vapor. So you will need to be logged in with the Vapor CLI that is either globally or per project installed. Learn about that in the Vapor Documentation.

Now that you have a valid Cloudflare API token and are logged in to a Vapor team that has access to the domain you are attempting to import, you can run the following command to import the DNS records for your domain.

cumulus records:import [THE_DOMAIN_NAME]

This will import any missing DNS records that Vapor specifies into the Cloudflare DNS zone. As well as update any incorrect or changed records.

If you would like to see what changes would be made before actually importing, you can add --dry-run to the end of the command.

The import command will attempt to "proxy" each added/updated record if it can be proxied. If you would not like the added records proxied, you can add --no-proxy to the end of the command.

Info about DNS record generation and Subdomains

Cumulus will work regardless of the environment you have assigned the custom domain to. It simply imports the correct DNS records for the domain provided. Laravel Vapor generates and stores the DNS records when a domain is assigned to a project environment and successfully deployed.

When you use a subdomain for a project environment Laravel Vapor will automatically generate the correct DNS records and store them with the root domain. So in order to import the correct DNS records for the subdomain you will need to import the root domain.

For example if you have a subdomain sub.example.com, you would run the following command to import the DNS records:

cumulus records:import example.com

orrison/cumulus 适用场景与选型建议

orrison/cumulus 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 20.4k 次下载、GitHub Stars 达 39, 最近一次更新时间为 2021 年 12 月 29 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 20.4k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 39
  • 点击次数: 22
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 39
  • Watchers: 4
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-12-29