diff --git a/README.md b/README.md index 1454b33..0bf5bfa 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,14 @@ Thake a long look at the [`.env`](.env) file, as most configuration options for Yarp are there. +### Disable dotenv file + +For this you need use additional ENV variable `YARP_DISABLE_DOTENV=1`. +You can provide ENV variables via bash from any file, for example: + + $ export $(cat /any_path/.rbenv-vars | xargs) && export YARP_DISABLE_DOTENV=1 && bundle exec rainbows -c rainbows.rb + + ### License Yarp is released under the MIT licence. diff --git a/config.ru b/config.ru index 7d516a1..014e293 100644 --- a/config.ru +++ b/config.ru @@ -1,8 +1,10 @@ lib = File.expand_path('../', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require 'dotenv' -Dotenv.load! +if ENV['YARP_DISABLE_DOTENV'].nil? + require 'dotenv' + Dotenv.load! +end require 'yarp/app' require 'yarp/initializers/new_relic'