seferov/deployer-bundle

Symfony 项目部署器

安装次数: 1,376

依赖项: 0

建议者: 0

安全: 0

星标: 3

关注者: 4

分支: 0

开放问题: 1

类型:symfony-bundle

1.1.0 2016-03-28 00:58 UTC

This package is auto-updated.

Last update: 2024-08-29 03:16:08 UTC


README

步骤 1: 下载 Bundle

打开命令行控制台,进入您的项目目录,并执行以下命令以下载 Bundle 的最新稳定版本

$ composer require seferov/deployer-bundle "~1"

此命令要求您已全局安装 Composer,具体请参考 Composer 文档中的安装章节

步骤 2: 启用 Bundle

然后,通过在您的项目的 app/AppKernel.php 文件中添加以下行来启用 Bundle

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Seferov\DeployerBundle\SeferovDeployerBundle(),
        );

        // ...
    }

    // ...
}

步骤 3: 配置

配置示例

seferov_deployer:
    servers:
        production:
            connection:
                host: %production_host% # ip address or domain
                username: root
            git: %git_endpoint%
        staging:
            connection:
                host: %staging_host% # ip address or domain
                username: root
            git: %git_endpoint%
            commands:
                before_install:
                    - "apt-get install php5-curl"

使用方法

首先通过运行以下命令在服务器上安装 deployer

$ app/console deployer:install production

现在您可以部署您的应用程序了

$ app/console deployer:push production