From 92c4a5ed217b94a9c7e3a16f83c40c56868db52a Mon Sep 17 00:00:00 2001 From: Igor Alexandrov Date: Thu, 26 Sep 2024 09:28:24 +0400 Subject: [PATCH] Reuse CONTAINER_NAME constant --- lib/kamal/configuration.rb | 2 +- lib/kamal/configuration/proxy.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/kamal/configuration.rb b/lib/kamal/configuration.rb index 2848a365..607a428d 100644 --- a/lib/kamal/configuration.rb +++ b/lib/kamal/configuration.rb @@ -255,7 +255,7 @@ def proxy_image end def proxy_container_name - "kamal-proxy" + proxy.container_name end diff --git a/lib/kamal/configuration/proxy.rb b/lib/kamal/configuration/proxy.rb index af09e2c7..775bfc42 100644 --- a/lib/kamal/configuration/proxy.rb +++ b/lib/kamal/configuration/proxy.rb @@ -59,6 +59,10 @@ def merge(other) self.class.new config: config, proxy_config: proxy_config.deep_merge(other.proxy_config) end + def container_name + CONTAINER_NAME + end + private def seconds_duration(value) value ? "#{value}s" : nil