Look for .env and app_root in the same dir as the Procfile.
This commit is contained in:
+4
-1
@@ -79,7 +79,10 @@ private ######################################################################
|
|||||||
end
|
end
|
||||||
|
|
||||||
def engine
|
def engine
|
||||||
@engine ||= Foreman::Engine.new(procfile, options)
|
root = File.expand_path(File.dirname(procfile))
|
||||||
|
env = File.expand_path(File.join(root, ".env"))
|
||||||
|
@engine ||= Foreman::Engine.new(procfile, options.merge({:app_root => root,
|
||||||
|
:env => env}))
|
||||||
end
|
end
|
||||||
|
|
||||||
def procfile
|
def procfile
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class Foreman::Engine
|
|||||||
|
|
||||||
def initialize(procfile, options={})
|
def initialize(procfile, options={})
|
||||||
@procfile = Foreman::Procfile.new(procfile)
|
@procfile = Foreman::Procfile.new(procfile)
|
||||||
@directory = options[:app_root] || File.expand_path(File.dirname(procfile))
|
@directory = options[:app_root]
|
||||||
@options = options.dup
|
@options = options.dup
|
||||||
@environment = read_environment_files(options[:env])
|
@environment = read_environment_files(options[:env])
|
||||||
@output_mutex = Mutex.new
|
@output_mutex = Mutex.new
|
||||||
@@ -214,7 +214,6 @@ private ######################################################################
|
|||||||
environment.merge!(Foreman::Engine.read_environment(filename))
|
environment.merge!(Foreman::Engine.read_environment(filename))
|
||||||
end
|
end
|
||||||
|
|
||||||
environment.merge!(Foreman::Engine.read_environment(".env")) unless filenames
|
|
||||||
environment
|
environment
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user