Skip to content

Commit

Permalink
Move config to dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtOfCode- committed Aug 28, 2020
1 parent d8d3c89 commit d58a37e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
14 changes: 0 additions & 14 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,5 @@ class Application < Rails::Application
config.exceptions_app = -> (env) do
ErrorsController.action(:error).call(env)
end

# Ensure docker ip added to allowed, given that we are in container
if File.file?('/.dockerenv') == true
host_ip = `/sbin/ip route|awk '/default/ { print $3 }'`.strip
config.web_console.whitelisted_ips << host_ip

# ==> Configuration for :confirmable
# A period that the user is allowed to access the website even without
# confirming their account.
days = ENV['CONFIRMABLE_ALLOWED_ACCESS_DAYS'] || '0'
config.allow_unconfirmed_access_for = (days.to_i).days

end

end
end
12 changes: 12 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,16 @@
config.action_mailer.default_url_options = { host: 'meta.codidact.com', protocol: 'https' }

config.active_storage.service = :s3

# Ensure docker ip added to allowed, given that we are in container
if File.file?('/.dockerenv') == true
host_ip = `/sbin/ip route|awk '/default/ { print $3 }'`.strip
config.web_console.whitelisted_ips << host_ip

# ==> Configuration for :confirmable
# A period that the user is allowed to access the website even without
# confirming their account.
days = ENV['CONFIRMABLE_ALLOWED_ACCESS_DAYS'] || '0'
config.allow_unconfirmed_access_for = (days.to_i).days
end
end

0 comments on commit d58a37e

Please sign in to comment.