Add healthcheck before deploy

This commit is contained in:
David Heinemeier Hansson
2023-02-18 16:22:08 +01:00
parent 2f80b300f0
commit 933ece35ab
11 changed files with 175 additions and 6 deletions

View File

@@ -107,6 +107,7 @@ class Mrsk::Configuration
end
end
def ssh_user
if raw_config.ssh.present?
raw_config.ssh["user"] || "root"
@@ -126,10 +127,15 @@ class Mrsk::Configuration
{ user: ssh_user, proxy: ssh_proxy, auth_methods: [ "publickey" ] }.compact
end
def audit_broadcast_cmd
raw_config.audit_broadcast_cmd
end
def healthcheck
{ "path" => "/up", "port" => "3000" }.merge(raw_config.healthcheck || {})
end
def valid?
ensure_required_keys_present && ensure_env_available