Merge pull request #828 from basecamp/configuration-validation
Configuration validation
This commit is contained in:
@@ -6,7 +6,7 @@ module Kamal::Cli::Healthcheck::Poller
|
||||
|
||||
def wait_for_healthy(pause_after_ready: false, &block)
|
||||
attempt = 1
|
||||
max_attempts = KAMAL.config.healthcheck["max_attempts"]
|
||||
max_attempts = KAMAL.config.healthcheck.max_attempts
|
||||
|
||||
begin
|
||||
case status = block.call
|
||||
@@ -33,7 +33,7 @@ module Kamal::Cli::Healthcheck::Poller
|
||||
|
||||
def wait_for_unhealthy(pause_after_ready: false, &block)
|
||||
attempt = 1
|
||||
max_attempts = KAMAL.config.healthcheck["max_attempts"]
|
||||
max_attempts = KAMAL.config.healthcheck.max_attempts
|
||||
|
||||
begin
|
||||
case status = block.call
|
||||
|
||||
@@ -126,6 +126,18 @@ class Kamal::Cli::Main < Kamal::Cli::Base
|
||||
end
|
||||
end
|
||||
|
||||
desc "docs", "Show Kamal documentation for configuration setting"
|
||||
def docs(section = nil)
|
||||
case section
|
||||
when NilClass
|
||||
puts Kamal::Configuration.validation_doc
|
||||
else
|
||||
puts Kamal::Configuration.const_get(section.titlecase.to_sym).validation_doc
|
||||
end
|
||||
rescue NameError
|
||||
puts "No documentation found for #{section}"
|
||||
end
|
||||
|
||||
desc "init", "Create config stub in config/deploy.yml and env stub in .env"
|
||||
option :bundle, type: :boolean, default: false, desc: "Add Kamal to the Gemfile and create a bin/kamal binstub"
|
||||
def init
|
||||
|
||||
Reference in New Issue
Block a user