Skip to content

Commit

Permalink
Update readme for new version
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Harman committed May 16, 2019
1 parent e7fc919 commit 100158b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 21 deletions.
4 changes: 2 additions & 2 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Contributions are accepted via Pull Requests on [Github](https://github.com/harm

# Things you could do
If you want to contribute but do not know where to start, this list provides some starting points.
- Add license text
- Set up TravisCI, StyleCI, ScrutinizerCI, Coveralls
- Add HHVM support in Travis CI
- Set up ScrutinizerCI, Coveralls
- Exract case statements in LaravelEnvcoder into seperate functions/classes

## Pull Requests
Expand Down
6 changes: 5 additions & 1 deletion license.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@

Copyright (c) Craig Harman <craig@harmonic.com.au>

...Add your license text here...
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
38 changes: 20 additions & 18 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# laravel-envcoder
# Laravel Envcoder

[![Latest Version on Packagist][ico-version]][link-packagist]
[![Total Downloads][ico-downloads]][link-downloads]
[![Build Status][ico-travis]][link-travis]
[![StyleCI][ico-styleci]][link-styleci]

Encrypts your Laravel .env so that it can be stored in source control and decrypted via a password.
Encrypts your Laravel .env so that it can be securely stored in source control and decrypted via a password.

It was written to quickly and easily share .env variables via source control instead of having to manually pass around env. variables or look them up in various 3rd party services.
It was written to quickly and easily share .env variables within source control instead of having to manually pass around variables or look them up in various 3rd party services.

![Envcoder-Demo](https://user-images.githubusercontent.com/324026/57817894-3942ab80-77b4-11e9-8cbd-24ee3ae17eab.gif)

Some highlights of the package include:

Expand All @@ -16,7 +18,7 @@ Some highlights of the package include:
* Can be configured to overwrite, merge, or interactively decide how to deal with merge conflicts within your .env
* Does not require any changes to your project to retrieve .env variables
* Simply edit your .env files as normal (and encrypt them when you are ready to share)
* Compare your encrypted .env with the current one and see whats differences
* Compare your encrypted .env with the current one and see what's different

## Installation

Expand All @@ -31,6 +33,17 @@ Publish the config file (optional)
php artisan vendor:publish --provider="harmonic\LaravelEnvcoder"
```

## Configuration

After publishing the config you can change the default behaviour for environment variable conflict resolution in **config/laravel-envcoder.php**.

* 'merge' => Will merge changes in both files, and overwrite duplicates with what is in .env.enc (default)
* 'prompt' => Will prompt you for each value that has a different value in .env.enc vs .env or is not in both files
* 'overwrite' => Will completely overwrite your .env with what is in the encrypted version
* 'ignore' => Will ignore any changes in your encrypted .env (ie. will not decrypt)

See config/laravel-envcoder.php for more details.

## Usage

### Encypting your .env
Expand All @@ -48,7 +61,7 @@ php artisan env:encrypt --password=password
```
(replace password with your password)

### Decrypt your .env
### Decrypting your .env

From your project root simply run:

Expand Down Expand Up @@ -88,25 +101,14 @@ You may wish to have your production deployment script delete the .env.enc file

If you include the password in your .env file for local development you could add the env:decrypt command to your composer post-install section to automatically updte your .env file each time you do a composer install, eg.

```
``` json
"scripts": {
"post-install-cmd": [
"@php artisan env:decrypt"
]
}
```

## Configuration

After publishing the config you can change the default behaviour for environment variable conflict resolution. To one of the following:

* 'merge' => Will merge changes in both files, and overwrite duplicates with what is in .env.enc (default)
* 'prompt' => Will prompt you for each value that has a different value in .env.enc vs .env or is not in both files
* 'overwrite' => Will completely overwrite your .env with what is in the encrypted version
* 'ignore' => Will ignore any changes in your encrypted .env (ie. will not decrypt)

See config/laravel-envcoder.php for more details.

## Change log

Please see the [changelog](changelog.md) for more information on what has changed recently.
Expand All @@ -123,7 +125,7 @@ Please see [contributing.md](contributing.md) for details and a todolist.

## Security

We have selected the defuse\php-encryption package to handle the encrytion and decryption of the .env file due to its ease of use and security. With that said, storing an encrypted .env file in your source control is less than secure than not storing it at all. We believe only marginally, but it's up to you to weigh up the security vs. convience and make a decision for your project.
We have selected the defuse\php-encryption package to handle the encrytion and decryption of the .env file due to its ease of use and security. With that said, storing an encrypted .env file in your source control is less secure than not storing it at all. We believe only marginally, but it's up to you to weigh up the security vs. convience and make a decision for your project.

If you discover any security related issues, please email craig@harmonic.com.au instead of using the issue tracker.

Expand Down

0 comments on commit 100158b

Please sign in to comment.