diff --git a/bin/kamal b/bin/kamal index cbe59b95e..5c8ea6be7 100755 --- a/bin/kamal +++ b/bin/kamal @@ -22,6 +22,22 @@ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this end require "rubygems" + +require_relative "../lib/fizzy" +if Fizzy.saas? + ENV["BUNDLE_WITH"] = [ ENV["BUNDLE_WITH"], "saas" ].compact.join(",") +end + require "bundler/setup" +if Fizzy.saas? + gem_path = Gem::Specification.find_by_name("fizzy-saas").gem_dir + deploy_config = File.join(gem_path, "config", "deploy.yml") + + # Add -c option to ARGV if not already present + unless ARGV.include?("-c") || ARGV.include?("--config-file") + ARGV.unshift("-c", deploy_config) + end +end + load Gem.bin_path("kamal", "kamal") diff --git a/config/deploy.beta.yml b/gems/fizzy-saas/config/deploy.beta.yml similarity index 100% rename from config/deploy.beta.yml rename to gems/fizzy-saas/config/deploy.beta.yml diff --git a/gems/fizzy-saas/config/deploy.dhh.yml b/gems/fizzy-saas/config/deploy.dhh.yml new file mode 100644 index 000000000..05bf874d4 --- /dev/null +++ b/gems/fizzy-saas/config/deploy.dhh.yml @@ -0,0 +1,12 @@ +servers: + web: + hosts: + - test-1 + jobs: + hosts: + - test-1 +env: + clear: + ARTENANT: test + +proxy: false diff --git a/config/deploy.production.yml b/gems/fizzy-saas/config/deploy.production.yml similarity index 100% rename from config/deploy.production.yml rename to gems/fizzy-saas/config/deploy.production.yml diff --git a/config/deploy.staging.yml b/gems/fizzy-saas/config/deploy.staging.yml similarity index 100% rename from config/deploy.staging.yml rename to gems/fizzy-saas/config/deploy.staging.yml diff --git a/config/deploy.yml b/gems/fizzy-saas/config/deploy.yml similarity index 100% rename from config/deploy.yml rename to gems/fizzy-saas/config/deploy.yml