ideato/idephix

PHP 自动化和部署工具。

0.19.0 2017-01-30 15:37 UTC

README

Stories in Ready Gitter Build Status Read the docs SensioLabsInsight Latest Stable Version Total Downloads Monthly Downloads License

Idephix - 自动化和部署工具

Idephix 是一个PHP自动化工具,可用于执行远程和本地任务。它可以用于部署应用程序、轮换日志、在服务器间同步数据仓库或创建构建系统。如果您想了解更多关于如何使用它的信息,请阅读文档

安装/使用

  1. 下载可执行文件 idephix.phar 并初始化您的 idxfile。

    $ curl -LSs http://getidephix.com/idephix.phar > idephix.phar
    $ chmod a+x idephix.phar
    $ idx initFile
  2. 现在您可以在您的 idxfile.php 中定义任务,只需定义 PHP 函数即可

    <?php
    
    /**
     * Execute the touch of a file specified in input
     * @param string $name the name of the file to be touch-ed
     * @param bool   $go   if not specified the script execute a dry-run
     */
    function testParams(\Idephix\Context $context, $name, $go = false)
    {
         $context->local('touch /tmp/'.$name);
         $context->remote('touch /tmp/'.$name.'_remote');
    }

有关如何定义任务、多环境配置以及其他更多信息,请阅读文档。Global 安装 Idephix

使用 Idephix 进行部署

Idephix 适用于许多不同的工作,但我们特别喜欢用它来进行应用程序部署。事实上,默认情况下,您的 idxfile.php 将使用我们的 PHP 应用程序部署 配方初始化,您可以用它作为您项目的起点。

要求

PHP 5.3.2 或更高版本,推荐 >=5.3.12

作者

许可证

Idephix 在 MIT 许可证下授权 - 有关详细信息,请参阅 LICENSE 文件