I have a config/deploy.yml with common configuration options, and a config/deploy.production.yml. I could very well have a config/deploy.staging.yml or what have you.
Whenever I deploy, I find it a bit of a hassle to always type kamal deploy -d production.
Would it make sense to add an option to somehow configure a default destination? Maybe something like default_destination: production in config/deploy.yml, or somewhere else.
In the meantime, I have the following hacky workaround in my bin/kamal Rails binstub:
...
# Make production the default Kamal destination
require 'thor'
destination =
Thor::Options.new(_: Thor::Option.new(:destination, { aliases: '-d' })).parse(ARGV)['destination']
if destination.nil?
destination = 'production'
ARGV.push('-d', 'production')
end
load Gem.bin_path('kamal', 'kamal')
I have a
config/deploy.yml
with common configuration options, and aconfig/deploy.production.yml
. I could very well have aconfig/deploy.staging.yml
or what have you.Whenever I deploy, I find it a bit of a hassle to always type
kamal deploy -d production
.Would it make sense to add an option to somehow configure a default destination? Maybe something like
default_destination: production
inconfig/deploy.yml
, or somewhere else.In the meantime, I have the following hacky workaround in my
bin/kamal
Rails binstub: