定制 mjaschen/deployer-tasks 二次开发

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

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

mjaschen/deployer-tasks

Composer 安装命令:

composer require mjaschen/deployer-tasks

包简介

README 文档

README

composer require --dev mjaschen/deployer-tasks 

Include the tasks in your deploy.php:

<?php

namespace Deployer;

require 'recipe/common.php';
require 'systemd-service.php';
require 'supervisord-service.php';

supervisord Services

Manages (already registered) supervisord services.

Example: stopping services before deployment, starting services when updated files are in place; show service status afterwards:

set('supervisord_service_names', ['acme_worker']);

// (optional) when supervisor command is not in $PATH:
set('supervisorctl_command', '/opt/supervisor/supervisorctl');

before('deploy:prepare', 'supervisord-service:stop')
after('deploy:symlink', 'supervisord-service:start')
after('supervisord-service:start', function() {
    sleep(1);
});
after('supervisord-service:start', 'supervisord-service:status');

Configuration

Alle possible configuration options with their default values:

set('supervisord_service_names', []);
set('supervisorctl_use_sudo', true);
set('supervisorctl_command', 'supervisorctl');

systemd Services

Manages (already registered) systemd services and timers.

Example: stopping services before deployment, starting services when updated files are in place; show service status afterwards:

set('systemd_service_names', ['acme_worker.service']);
set('systemd_timer_names', ['acme_scheduler.timer']);

before('deploy:prepare', 'systemd-service:stop')
before('deploy:prepare', 'systemd-timer:stop')
after('deploy:symlink', 'systemd-service:start')
after('deploy:symlink', 'systemd-timer:start')
after('systemd-service:start', function() {
    sleep(1);
});
after('systemd-timer:start', function() {
    sleep(1);
});
after('systemd-service:start', 'systemd-service:status');
after('systemd-timer:start', 'systemd-timer:status');

Configuration

All possible configuration options with their default values:

set('systemd_service_names', []);
set('systemd_timer_names', []);
set('systemd_systemctl_use_sudo', true);
set('systemd_systemctl_command', 'systemctl');

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固