PHPackages                             alfred-nutile-inc/env-deployer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. alfred-nutile-inc/env-deployer

AbandonedArchivedLibrary[DevOps &amp; Deployment](/categories/devops)

alfred-nutile-inc/env-deployer
==============================

Makes deploying Env super easy

v0.0.3(9y ago)1310.4k1[2 issues](https://github.com/alfred-nutile-inc/env-deployer/issues)PHPPHP &gt;=5.4.0

Since Jun 7Pushed 8y ago15 watchersCompare

[ Source](https://github.com/alfred-nutile-inc/env-deployer)[ Packagist](https://packagist.org/packages/alfred-nutile-inc/env-deployer)[ RSS](/packages/alfred-nutile-inc-env-deployer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (9)Versions (5)Used By (0)

[![Build Status](https://camo.githubusercontent.com/aaf6213d7e877946daa33ccd3adc26c2a8ce56b19b8134dac536969e3f522641/68747470733a2f2f7472617669732d63692e6f72672f616c667265642d6e7574696c652d696e632f656e762d6465706c6f7965722e737667)](https://travis-ci.org/alfred-nutile-inc/env-deployer)

Env Deployer
============

[](#env-deployer)

**Only works with 5.1 and greater**

See the [video](http://youtu.be/ppEzRgGSdFw)

[![envdeploy](https://camo.githubusercontent.com/aaa7ca84e4a01c6fad40dad850049fa9755f342403641d1143bc3b31afbe1d23/68747470733a2f2f646c2e64726f70626f7875736572636f6e74656e742e636f6d2f732f36713879326a6f6e6e7630387365662f656e766465706c6f7965722e706e673f646c3d30)](https://camo.githubusercontent.com/aaa7ca84e4a01c6fad40dad850049fa9755f342403641d1143bc3b31afbe1d23/68747470733a2f2f646c2e64726f70626f7875736572636f6e74656e742e636f6d2f732f36713879326a6f6e6e7630387365662f656e766465706c6f7965722e706e673f646c3d30)

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
-------

[](#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.

```
