定制 alfred-nutile-inc/env-deployer 二次开发

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

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

alfred-nutile-inc/env-deployer

最新稳定版本:v0.0.3

Composer 安装命令:

composer require alfred-nutile-inc/env-deployer

包简介

Makes deploying Env super easy

README 文档

README

Build Status

Env Deployer

Only works with 5.1 and greater

See the video

envdeploy

This will take your local environment and deploy it to the selected server

Your config file will have the list of servers

For example say your .env looks like this

The new Laravel tail library spatie/laravel-tail inspired and helped this a ton

#@dev=dev
#@stage=stage
APP_ENV=local

#@dev=dev_db
#@stage=stage_db
DATABASE_NAME=local_db

If you run the command

php artisan envdeployer:push dev

This will send you local to dev replacing the values as needed.

APP_ENV=dev
DATABASE_NAME=dev_db

This makes it super easy for local developers to merge their env to the different servers while at time keep a local .env and .env.example

php artisan envdeployer:make-example

Would then setup example with random values

php artisan envdeployer:share

Would place it on the config setting share path for the team member to write

php artisan envdeployer:share get

To get and pull that down as their env settings.

Lastly

php artisan envdeployer:get_and_merge dev

Would get dev and merge it into your local setting #@dev=foo as needed and adding values you are missing

Install

You can install the package via composer:

composer require 'alfred-nutile-inc/env-deployer:dev-master'

You must install this service provider:

// config/app.php

'providers' => [
    ...
    'AlfredNutileInc\EnvDeployer\EnvDeployerServiceProvider',
    ...
];

Now to setup your config:

php artisan vendor:publish --provider="AlfredNutileInc\EnvDeployer\EnvDeployerServiceProvider"

A file named envdeployer.php will be created in the config directory. The options you can set in the file should be self-explanatory.

<?php

return [

    'connections' => [

        /*
         * The environment name.
         */
        'dev' => [

            /*
             * The hostname to send the env file to
             */
            'host'  => 'example_target.dev',

            /*
             * The username to be used when connecting to the server where the logs are located
             */
            'user' => 'vagrant',

            /*
             * The full path to the directory where the .env is located MUST end in /
             */
            'rootEnvDirectory' => '/home/vagrant/mysite/',

            'port' => 2222
        ],
    ],
];

RoadMap

Immediate Todo Items Make it a true laravel 5 library with config settings

  1. get file from target and merge into local

  2. share command so teams can share the file securely

统计信息

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

GitHub 信息

  • Stars: 13
  • Watchers: 15
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-06-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固