statikbe/deployer-tasks
最新稳定版本:0.0.3
Composer 安装命令:
composer require statikbe/deployer-tasks
包简介
Reusable Deployer 8 tasks for Statik.be projects (Laravel, Craft CMS, common integrations).
README 文档
README
Reusable Deployer 8 tasks and recipes for Statik.be projects.
Requirements
- PHP 8.3+
- Deployer 8.x
Installation
composer require --dev statikbe/deployer-tasks
Usage
Laravel projects
<?php namespace Deployer; require 'vendor/statikbe/deployer-tasks/recipe/laravel.php'; set('application', 'my-app'); set('repository', 'git@github.com:statikbe/my-app.git'); host('production') ->set('hostname', 'prod.example.org') ->set('deploy_path', '/var/www/my-app');
Craft CMS projects
<?php namespace Deployer; require 'vendor/statikbe/deployer-tasks/recipe/craft.php'; // ...host config
À la carte
Require an individual task file and wire the hook yourself:
require 'vendor/statikbe/deployer-tasks/recipe/tasks/voight.php'; after('deploy', 'statik:voight');
Available tasks
| Task | Description |
|---|---|
statik:reload-phpfpm |
Reload PHP-FPM safely with mutex, debounce, and opcache validation. Wired by both starters to after('deploy:symlink', ...). |
statik:voight |
Download and run the Voight versioning script in the release path. |
More tasks (composer install with secret env, local-build asset rsync, maintenance banner, config-file sync) ship in upcoming releases.
reload-phpfpm
If the probe URL is behind .htaccess basic auth, configure the credentials in your project's deploy.php after the require line:
require 'vendor/statikbe/deployer-tasks/recipe/laravel.php'; set('basic_auth_user', 'htaccess_user'); set('basic_auth_password', 'htaccess_password'); host('production')->set(/* ... */);
Both values must be set; if either is empty the task runs without auth. You can also source them from the environment (e.g. set('basic_auth_user', getenv('BASIC_AUTH_USER'));) — handy for Bitbucket Pipelines repository variables. Per-host overrides work too: host('staging')->set('basic_auth_user', '...');.
The application's .env no longer needs BASIC_AUTH_USER / BASIC_AUTH_PASSWORD for this task. Existing projects should remove those keys from .env and move them to deploy.php via the set() calls above.
Development
composer install composer test # Pest — currently no tests; helper classes in src/ will get unit tests composer format # Laravel Pint composer analyse # PHPStan (exits non-zero until src/ has PHP files; recipe/ is intentionally excluded since Deployer's global functions need stubs)
The recipes are smoke-tested by loading them through Deployer:
vendor/bin/dep --file=tests/fixtures/laravel-deploy.php list vendor/bin/dep --file=tests/fixtures/craft-deploy.php list
License
MIT — see LICENSE.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-05-08