Merge pull request #437 from basecamp/kamal-run-directory

Configurable Kamal directory
This commit is contained in:
Donal McBreen
2023-09-06 14:31:07 +01:00
committed by GitHub
17 changed files with 101 additions and 23 deletions

View File

@@ -19,7 +19,9 @@ class Kamal::Commands::Auditor < Kamal::Commands::Base
private
def audit_log_file
[ "kamal", config.service, config.destination, "audit.log" ].compact.join("-")
file = [ config.service, config.destination, "audit.log" ].compact.join("-")
"#{config.run_directory}/#{file}"
end
def audit_tags(**details)

View File

@@ -40,7 +40,7 @@ class Kamal::Commands::Lock < Kamal::Commands::Base
end
def lock_dir
"kamal_lock-#{config.service}"
"#{config.run_directory}/lock-#{config.service}"
end
def lock_details_file

View File

@@ -0,0 +1,5 @@
class Kamal::Commands::Server < Kamal::Commands::Base
def ensure_run_directory
[:mkdir, "-p", config.run_directory]
end
end