Giter Site home page Giter Site logo

hedinfaok / vagrant-env Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gosuri/vagrant-env

0.0 1.0 0.0 144 KB

Vagrant plugin to load environment variables from .env into ENV

Home Page: http://kn0t.ch/vagrant-env-intro

License: MIT License

Ruby 100.00%

vagrant-env's Introduction

Vagrant ENV Plugin

This is a Vagrant plugin to load environment variables from .env into ENV. For more on how and why we use this plugin, please see http://kn0t.ch/vagrant-env-intro

Usage

Install using standard Vagrant plugin installation methods.

$ vagrant plugin install vagrant-env

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

$ echo BOX_NAME=foo > .env

And then make a Vagrantfile that looks like the following, make sure to add config.env.enable and fill in your information where necessary.

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

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

vagrant-env's People

Watchers

Rob Eden avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.