Making healthchecks during deployment more relaxed
This commit is contained in:
parent
d0612d25ea
commit
51c297c107
2 changed files with 3 additions and 2 deletions
2
CHECKS
2
CHECKS
|
|
@ -1 +1,3 @@
|
||||||
|
WAIT=10
|
||||||
|
ATTEMPTS=10
|
||||||
/healthcheck
|
/healthcheck
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,7 @@ Healthcheck.configure do |config|
|
||||||
# config.add_check :cache, -> { Rails.cache.read('some_key') }
|
# config.add_check :cache, -> { Rails.cache.read('some_key') }
|
||||||
# config.add_check :environments, -> { Dotenv.require_keys('ENV_NAME', 'ANOTHER_ENV') }
|
# config.add_check :environments, -> { Dotenv.require_keys('ENV_NAME', 'ANOTHER_ENV') }
|
||||||
config.add_check :env, -> {
|
config.add_check :env, -> {
|
||||||
keys = %W(SALSA_OAUTH_KEY SALSA_OAUTH_SECRET)
|
['SALSA_OAUTH_KEY', 'SALSA_OAUTH_SECRET'].each do |key|
|
||||||
keys.each do |key|
|
|
||||||
puts "checking for environment variable #{key}"
|
puts "checking for environment variable #{key}"
|
||||||
raise "Env variable #{key} not set" unless ENV.key?(key)
|
raise "Env variable #{key} not set" unless ENV.key?(key)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue