• Stars
    star
    144
  • Rank 247,547 (Top 6 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 9 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Vagrant plugin to load environment variables from .env into ENV

Vagrant ENV Plugin

This is a Vagrant plugin to load environment variables from .env into ENV. More information on why and how we use this plugin is detailed in this post

Requirements

  • Vagrant 1.7.4 or higher

Installation

Install the lastest version using standard vagrant plugin installation method:

$ vagrant plugin install vagrant-env

To install an older version of the plugin use vagrant plugin install vagrant-env --plugin-version VERSION

Usage

After installing, add your application configuration to your .env file in the root of your project

$ echo BOX_NAME=hashicorp/precise64 > .env

Create a a Vagrantfile that looks like the following, ensure to add config.env.enable and fill in your information where necessary. Check out example for reference

Vagrant.configure("2") do |config|
  config.env.enable # enable the plugin
  config.vm.box = ENV['BOX_NAME']
end

Additionally, You may also add export in front of each line so you can source the file in bash:

export AWS_ACCESS_ID=YOURACCESSIDGOESHERE
export AWS_SECRET_ACCESS_ID=YOURSECRETKEYGOESHERE

Should I commit my .env file?

It is recommended that you store development-only settings in your .env file, and commit it to your repository. Make sure that all your credentials for your development environment are different from your other deployments. This makes it easy for other developers to get started on your project, without compromising your credentials for other environments.

Contributing

  1. Fork it ( https://github.com/gosuri/vagrant-env/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

More Repositories

1

uiprogress

A go library to render progress bars in terminal applications
Go
2,062
star
2

uilive

uilive is a go library for updating terminal output in realtime
Go
1,648
star
3

uitable

A go library to improve readability in terminal apps using tabular data
Go
721
star
4

go-store

A simple and fast Redis backed key-value store library for Go
Go
112
star
5

cmdns

cmdns is a go library for namespacing a command tree
Go
25
star
6

aws-rds-cookbook

Development repository for chef cookbook aws-rds
Ruby
16
star
7

dotfiles

Greg Osuri's dotfiles
Shell
10
star
8

terraform-exec-provider

Go
9
star
9

git-url-sub

git remote url substitution utility
Shell
7
star
10

awesome-sysops

Curated list of awesome tools for systems operators
6
star
11

rails-app-cookbook

Example cookbook using aws-rds cookbook to install rails_app
Ruby
6
star
12

dsky

dsky is a UI framework for terminal applications
Go
5
star
13

monocle

a go library for advanced command line help
Go
5
star
14

multibar

[DEPRICATED] MultiBar is go library to render progress bars in the terminal
Go
5
star
15

Pylearn

Greg Osuri's Python Journey
4
star
16

uiutil

uiutil is a go library that provides a set of helpers to improve readbility in terminal applications
Go
4
star
17

handshake-containers

Makefile
4
star
18

ctxexec

ctxexec is go library that provides helper functions for running context-aware external commands
Go
3
star
19

grumpy

Grumpy cat is a blockchain to honor Grumpy Cat
TypeScript
2
star
20

gosuri.github.io

Source for gregosuri.com
SCSS
2
star
21

aws-vpc-terraform-post

Support files for my airpair post
1
star
22

petit

a simple, fast, rack-based url routing server
Ruby
1
star
23

test-runner

Linux container based test running tools for ruby applications
Shell
1
star
24

ap-workshop-cookbooks

Chef cookbooks for my Airpair containers workshop
Ruby
1
star
25

vanitypkg

vanitypkg provides a server that hosts vanity package names for Go package hosted on github
Go
1
star
26

akt20

1
star
27

hostnamer

Cluster member discovery and registration tool for Route 53
Ruby
1
star
28

knife-ec2-ssh-config

Knife plugin to update ssh client config with ec2 instance information
Ruby
1
star
29

chef-ebs-directory

Chef cookbook for moving a directory to a ebs volume
Ruby
1
star
30

noop

An empty repo used for testing git ops
1
star
31

build-compiler

Container based build tools for Ubuntu 14.04
Shell
1
star
32

nextjs-notes

JavaScript
1
star
33

eve

eve fork
Go
1
star