lib/potassium/recipes/heroku.rb in potassium-2.2.0 vs lib/potassium/recipes/heroku.rb in potassium-2.3.0
- old
+ new
@@ -36,10 +36,12 @@
def add_heroku
gather_gems(:production) do
gather_gem('rails_stdout_logging')
end
+ gather_gem 'heroku-stage'
+
copy_file '../assets/Procfile', 'Procfile'
copy_file '../assets/.buildpacks', '.buildpacks'
template "../assets/bin/setup_heroku.erb", "bin/setup_heroku", force: true
run "chmod a+x bin/setup_heroku"
@@ -82,10 +84,12 @@
def create_app_on_heroku(environment)
rack_env = "RACK_ENV=production"
staged_app_name = app_name_for(environment)
run_toolbelt_command "create #{staged_app_name} --remote #{environment}"
+ run_toolbelt_command "labs:enable runtime-dyno-metadata", staged_app_name
+ run_toolbelt_command "config:add HEROKU_APP_NAME=#{staged_app_name}", staged_app_name
run_toolbelt_command "config:add #{rack_env}", staged_app_name
run_toolbelt_command "config:add DEPLOY_TASKS=db:migrate", staged_app_name
set_rails_secrets(environment)
set_app_multi_buildpack(environment)
@@ -99,10 +103,10 @@
)
end
def set_app_multi_buildpack(environment)
run_toolbelt_command(
- "buildpacks:set https://github.com/ddollar/heroku-buildpack-multi.git",
+ "buildpacks:set https://github.com/heroku/heroku-buildpack-multi.git",
app_name_for(environment)
)
end
def add_app_to_pipeline(app_env_name, environment)