Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikamai/opsworks-dotenv
https://github.com/mikamai/opsworks-dotenv
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mikamai/opsworks-dotenv
- Owner: mikamai
- License: mit
- Created: 2014-07-02T15:17:09.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-06T17:07:56.000Z (almost 9 years ago)
- Last Synced: 2024-08-01T01:28:00.796Z (3 months ago)
- Language: Ruby
- Size: 120 KB
- Stars: 8
- Watchers: 23
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rails-gem - opsworks-dotenv - Opsworks-dotenv let you configure the environment for you Rails application using OpsWorks, Chef and Dotenv. (Environment Variables / Omniauth)
README
opsworks-dotenv
===============Configure the environment for you Rails application using OpsWorks, Chef and Dotenv
### install
Add the Dotenv gem to your `Gemfile`
```ruby
gem 'dotenv-rails'
```run bundle
```bash
$ bundle
```as soon as possible, load the environment through Dotenv
```ruby
# application.rb
require File.expand_path('../boot', __FILE__)
require 'dotenv'
Dotenv.load```
### configure
In the OpsWorks stack dashboard click on stack Settings and supply your ENV configuration.
For example:```json
{
"deploy":{
"app_name":{
"symlink_before_migrate":{
".env" : ".env"
},
"app_env": {
"YOUR_ENV_KEY": "KEY_VALUE",
"ANOTHER_ENV_KEY": "SECOND_VALUE"
}
}
}
}
```The `symlink_before_migrate` key just tells OpsWorks to create a link to `.env` file in `shared`
application folder into `current`, so it can be picked up by Rails.You can now deploy your app and enjoy the `ENV`