主演-jane/部署者食谱

一个包含部署者食谱的composer包

1.1.0 2024-03-21 09:09 UTC

This package is auto-updated.

Last update: 2024-09-21 10:20:53 UTC


README

安装

composer require starring-jane/deployer-recipes

存档食谱

// deploy.php
<?php

namespace Deployer;

// Add the recipe
require __DIR__ . '/vendor/starring-jane/deployer-recipes/archive.php';

// Keep at least 2 releases to be able to archive the previous release
set('keep_releases', 2);

// Archive the previous release after the symlink update
after('deploy:symlink', 'archive:archive');

// Put the archived release back to rollback
before('rollback', 'archive:unarchive');

// Any other configuration you already had
...

磁盘空间食谱

此食谱检查是否有足够的磁盘空间来创建发布。它会检查之前发布的尺寸以计算所需的空间。如果磁盘空间不足,它将抛出错误并停止部署

// deploy.php
<?php

namespace Deployer;

// Add the recipe
require __DIR__ . '/vendor/starring-jane/deployer-recipes/diskspace.php';

// Add the 'diskspace:check' task at the beginning of your deploy tasks
task('deploy', [
    'deploy:info',
    'deploy:setup',
    'diskspace:check', // NEW TASK
    'deploy:lock',
    'deploy:release',
    ...
]);

// Any other configuration you already had
...

贡献者