mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 10:58:31 -05:00
add custom clean env
This commit is contained in:
parent
23bf4436f5
commit
60284d8a9a
1 changed files with 15 additions and 5 deletions
|
@ -59,12 +59,22 @@ unless File.exists?("config/redis.yml")
|
|||
`cp config/redis.yml.sample config/redis.yml`
|
||||
end
|
||||
|
||||
# Github settings
|
||||
ENV["RAILS_ENV"] = "profile"
|
||||
|
||||
if ARGV.include?("--noenv")
|
||||
puts "Running with default environment"
|
||||
ENV.delete "RUBY_GC_MALLOC_LIMIT"
|
||||
ENV.delete "RUBY_HEAP_SLOTS_GROWTH_FACTOR"
|
||||
ENV.delete "RUBY_HEAP_MIN_SLOTS"
|
||||
ENV.delete "RUBY_FREE_MIN"
|
||||
else
|
||||
# Github settings
|
||||
puts "Running with tuned environment"
|
||||
ENV["RUBY_GC_MALLOC_LIMIT"] = "1000000000"
|
||||
ENV["RUBY_HEAP_SLOTS_GROWTH_FACTOR"] = "1.25"
|
||||
ENV["RUBY_HEAP_MIN_SLOTS"] = "800000"
|
||||
ENV["RUBY_FREE_MIN"] = "600000"
|
||||
end
|
||||
|
||||
def port_available? port
|
||||
server = TCPServer.open("0.0.0.0", port)
|
||||
|
|
Loading…
Reference in a new issue