devoption/beacon 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

devoption/beacon

Composer 安装命令:

composer require devoption/beacon

包简介

Production-ready Docker and Helm support for Laravel applications, with guided installation, Octane integration, and streamlined build/deploy workflows.

README 文档

README

Production-ready Docker and Helm support for Laravel applications, with guided installation, Octane integration, and streamlined build and deploy workflows.

What Beacon does

Beacon installs into an existing Laravel application and scaffolds the first layer of production deployment assets.

Current MVP features:

  • interactive php artisan beacon:install command built with Laravel Prompts
  • optional Laravel Octane installation when the Octane runtime is selected
  • Dockerfile generation for php-fpm or octane
  • Helm chart scaffolding under charts/<application-slug>
  • named Helm environment overlays for local, staging, and production
  • managed Composer scripts for beacon:build and beacon:deploy
  • Pest coverage, Laravel compatibility CI, and automated semantic releases for the package itself

Out of scope for this MVP:

  • cloud-specific deployment logic
  • full platform provisioning
  • environment-specific infrastructure assumptions

Requirements

  • PHP ^8.3
  • Laravel ^11.0 | ^12.0 | ^13.0

Install

Recommended as a development dependency in the Laravel application you want to prepare:

composer require devoption/beacon --dev

Then run the installer:

php artisan beacon:install

Install flow

Beacon currently prompts for:

  • application name
  • runtime: php-fpm or octane
  • deployment scaffolding: docker, helm, or docker-and-helm
  • ingress provider: disabled, Ingress NGINX, or Traefik
  • secret handling: Beacon-managed Helm secret or an existing Kubernetes secret
  • whether Beacon should update Composer scripts

When the Octane runtime is selected, Beacon checks the target application's composer.json and installs laravel/octane if it is not already present.

Generated files

Depending on the options you choose, Beacon generates:

  • Dockerfile
  • charts/<application-slug>/Chart.yaml
  • charts/<application-slug>/values.yaml
  • charts/<application-slug>/values.local.yaml
  • charts/<application-slug>/values.local.secrets.example.yaml
  • charts/<application-slug>/values.staging.yaml
  • charts/<application-slug>/values.staging.secrets.example.yaml
  • charts/<application-slug>/values.production.yaml
  • charts/<application-slug>/values.production.secrets.example.yaml
  • charts/<application-slug>/templates/_helpers.tpl
  • charts/<application-slug>/templates/deployment.yaml
  • charts/<application-slug>/templates/secret.yaml
  • charts/<application-slug>/templates/service.yaml
  • charts/<application-slug>/templates/ingress.yaml

If Composer script updates are enabled, Beacon also manages:

  • beacon:build
  • beacon:deploy

Example managed scripts:

{
  "scripts": {
    "beacon:build": "docker build --file Dockerfile --tag my-app:latest .",
    "beacon:deploy": "@php artisan beacon:deploy"
  }
}

Beacon generates values.yaml as the shared chart values file and also creates environment-specific overlays for local, staging, and production. The selected ingress strategy is persisted there so the generated chart knows whether ingress is disabled and which class name Beacon should prepare for. The deploy command always applies values.yaml first, then layers the selected environment values file on top when it runs Helm.

Sensitive application values are kept out of the committed environment overlays. Beacon now:

  • keeps non-sensitive settings in the regular values*.yaml files
  • generates values.<environment>.secrets.example.yaml templates to show the expected secret structure
  • adds /charts/*/values.*.secrets.yaml to the Laravel app .gitignore
  • automatically includes values.<environment>.secrets.yaml during beacon:deploy when that ignored file exists

This keeps secret values out of Git-tracked files, but it does not keep them out of Helm release metadata. When values.<environment>.secrets.yaml is passed to Helm, those values are stored in the Helm release Secret or ConfigMap and can remain in release history.

If you choose the existing Kubernetes secret mode during installation, Beacon configures the chart to reference that external secret instead of creating its own Secret manifest. Use that mode, or another workflow that injects secrets outside Helm values files, if you need to avoid persisting secret values in Helm release metadata or history.

Rerunning the installer

Beacon is designed to be rerunnable.

  • generated Beacon-managed files are rewritten with current stub output
  • unchanged generated files remain unchanged on repeat runs
  • Beacon-managed Composer script entries are updated without replacing unrelated user scripts

Development

Run the test suite with:

composer test

Repository automation also includes:

For contributor workflow details, see CONTRIBUTING.md.

For maintainer release and Packagist setup notes, see docs/RELEASING.md.

License

MIT

devoption/beacon 适用场景与选型建议

devoption/beacon 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 1, 最近一次更新时间为 2026 年 04 月 05 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-05