vanaboom/laravel-toolbox
Composer 安装命令:
composer require vanaboom/laravel-toolbox
包简介
Laravel toolbox
README 文档
README
A development toolkit for Laravel applications with built-in Docker scaffolding, Supervisor configurations, and optional services like Horizon, Echo Server, and Scheduler.
Features
- Laravel Octane ready with RoadRunner by default and optional FrankenPHP support
- Preconfigured Supervisor process management
- Optional service configs for Horizon, Echo Server, Scheduler
- Environment-based starter mode (
devorprod) - Ready-to-publish Docker scaffold for rapid project setup
- Works seamlessly with the public base image
vanaboom/laravel-boomkit
Installation
composer require vanaboom/laravel-toolbox
Or, for the first-time setup with Docker (without Composer installed locally):
docker run --rm -it \ --add-host=host.docker.internal:host-gateway \ -u $(id -u):$(id -g) \ -v "$PWD":/code -w /code \ vanaboom/laravel-boomkit:1.10.2-alpine \ sh -lc ' composer require vanaboom/laravel-toolbox --no-interaction --no-scripts && php artisan toolbox:publish-docker --force && chmod +x .docker/app/start-container '
Replace alpine with your BUILD_TAG, or use alpine-frankenphp together with OCTANE_SERVER=frankenphp.
Configuration
Publish the configuration file:
php artisan vendor:publish --provider="Vanaboom\\LaravelToolbox\\ToolboxServiceProvider" --tag="config"
The config file will be published to config/toolbox.php.
Key options:
mode→devorprodverbose_mode→ Enable verbose logging for starter commandoctane_watch→ Whether to enable Octane file watching in dev mode
Docker Scaffold
Publish a ready-to-use Docker scaffold into your Laravel app:
php artisan toolbox:publish-docker # then: # docker compose up -d
The scaffold includes:
-
Dockerfile using
vanaboom/laravel-boomkit:${BOOMKIT_VERSION}-${BUILD_TAG} -
Supervisor configs:
starter→ Runsphp artisan toolbox:starter- Optional:
horizon,echo-server,scheduler(copy from.ini.exampleto enable)
-
Configurable environment variables for user/group IDs, app directory, custom commands, Octane runtime, Docker registry mirror, and more
To avoid Composer re-running on every container start, add stamp files to your .gitignore:
*.stamp
Example docker-compose service
services: app: build: context: ./.docker/app dockerfile: Dockerfile args: UID: ${UID:-1000} GID: ${GID:-1000} CURRENT_USER: ${CURRENT_USER} CURRENT_GROUP: ${CURRENT_GROUP} APP_ENV: ${APP_ENV:-production} BOOMKIT_VERSION: ${BOOMKIT_VERSION:-1.10.2} BUILD_TAG: ${BUILD_TAG:-alpine} TIMEZONE: ${APP_TIMEZONE:-UTC} DOCKER_REGISTRY: ${DOCKER_REGISTRY:-docker.io} environment: COMPOSER_MEMORY_LIMIT: -1 TOOLBOX_STARTER_MODE: ${TOOLBOX_STARTER_MODE:-dev} TOOLBOX_VERBOSE_MODE: ${TOOLBOX_VERBOSE_MODE:-false} OCTANE_SERVER: ${OCTANE_SERVER:-roadrunner} TIMEZONE: ${APP_TIMEZONE:-UTC} COMPOSER_MIRROR_URL: ${COMPOSER_MIRROR_URL:-https://repo.packagist.org/} NPM_MIRROR_URL: ${NPM_MIRROR_URL:-https://registry.npmjs.org/} restart: unless-stopped extra_hosts: - 'host.docker.internal:host-gateway' ports: - ${APP_PORT:-11000}:8888 volumes: - ./.docker/app/conf.d/supervisord.conf:/etc/supervisord.conf - ./.docker/app/supervisor.d:/etc/supervisor.d - ./:/code healthcheck: test: curl --fail -s http://localhost:8888/health || exit 1 interval: 1m timeout: 30s retries: 3
Octane Runtime
RoadRunner remains the default runtime for backward compatibility. To use FrankenPHP, build with the Boomkit FrankenPHP tag and set the Octane server explicitly:
BUILD_TAG=alpine-frankenphp OCTANE_SERVER=frankenphp
For registries or Docker Hub mirrors, set DOCKER_REGISTRY to the mirror prefix used by your environment.
Healthcheck Route
Add this to your routes/web.php to make the Docker healthcheck work:
Route::get('/health', fn() => response()->noContent());
Supervisor
The scaffold comes with /etc/supervisor.d containing process configs.
Starter
Runs the Laravel Toolbox starter command based on environment:
[program:starter] command=php artisan toolbox:starter
Horizon (optional)
Copy horizon.ini.example to horizon.ini to enable:
[program:horizon] command=php artisan horizon
Echo Server (optional)
Copy echo-server.ini.example to echo-server.ini to enable:
[program:echo-server] command=node /code/echo-server/server.js
Scheduler (optional)
Copy scheduler.ini.example to scheduler.ini to enable:
[program:scheduler] command=php artisan schedule:work
License
This package is open-sourced software licensed under the MIT license.
vanaboom/laravel-toolbox 适用场景与选型建议
vanaboom/laravel-toolbox 是一款 基于 Shell 开发的 Composer 扩展包,目前已累计 226 次下载、GitHub Stars 达 2, 最近一次更新时间为 2025 年 07 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「Toolbox」 「roadrunner」 「octane」 「vanaboom」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 vanaboom/laravel-toolbox 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 vanaboom/laravel-toolbox 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 vanaboom/laravel-toolbox 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Toolbox
RoadRunner and Ubiquity integration
Make Codeigniter4 work on Roadrunner Server.
It directly integrates the entire JBZoo libraries in one place. In the future, it will be the framework.
Supercharge your Lumen application's performance.
RoadRunner <-> Lumen Integration
统计信息
- 总下载量: 226
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 22
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-07-13