Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting multi-dc deploys #559

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/kamal/commands/healthcheck.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class Kamal::Commands::Healthcheck < Kamal::Commands::Base

def run
web = config.role(:web)
web = config.role(:web) || config.roles.select(&:running_traefik?).first

docker :run,
"--detach",
Expand Down
6 changes: 3 additions & 3 deletions lib/kamal/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def load_config_files(*files)

def load_config_file(file)
if file.exist?
YAML.load(ERB.new(IO.read(file)).result).symbolize_keys
YAML.load(ERB.new(IO.read(file)).result, aliases: true).symbolize_keys
else
raise "Configuration file not found in #{file}"
end
Expand Down Expand Up @@ -90,7 +90,7 @@ def all_hosts
end

def primary_web_host
role(:web).primary_host
(role(:web) || roles.select(&:running_traefik?).first).primary_host
end

def traefik_hosts
Expand Down Expand Up @@ -249,7 +249,7 @@ def ensure_required_keys_present

roles.each do |role|
if role.hosts.empty?
raise ArgumentError, "No servers specified for the #{role.name} role"
puts "Warning: No servers specified for the #{role.name} role"
end
end

Expand Down
Loading