Sha256: 9ff78f9c33e9a5775c065b4bbcd7d8f568d1040f7fbceaeb8ac1349b609f144e
Contents?: true
Size: 674 Bytes
Versions: 15
Compression:
Stored size: 674 Bytes
Contents
module Cirneco module Base # load ENV variables from .env file if it exists env_file = File.expand_path("../../../.env", __FILE__) if File.exist?(env_file) require 'dotenv' Dotenv.overload env_file end # load ENV variables from container environment if json file exists # see https://github.com/phusion/baseimage-docker#envvar_dumps env_json_file = "/etc/container_environment.json" if File.exist?(env_json_file) env_vars = JSON.parse(File.read(env_json_file)) env_vars.each { |k, v| ENV[k] = v } end # default values for some ENV variables ENV['MDS_URL'] ||= "https://mds.test.datacite.org" end end
Version data entries
15 entries across 15 versions & 1 rubygems