From fb02b9e1db38e9d9eb3db90b2153e429f92baed6 Mon Sep 17 00:00:00 2001 From: James Adam Date: Fri, 25 Jul 2014 16:45:02 -0500 Subject: [PATCH] Foreman needs an env file to set environment variables As of ddollar/foreman@c039f379ff1b6eb87673aa73a3548ba20d1722e4, Foreman won't run a shell to run the command under upstart, but uses a `.env` file and inserts the environment variables directly into the upstart scripts. --- lib/recap/tasks/foreman.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/recap/tasks/foreman.rb b/lib/recap/tasks/foreman.rb index 4ae36bf..623ceaf 100644 --- a/lib/recap/tasks/foreman.rb +++ b/lib/recap/tasks/foreman.rb @@ -19,7 +19,7 @@ module Recap::Tasks::Foreman set(:foreman_export_location, "/etc/init") # The standard foreman export. - set(:foreman_export_command) { "./bin/foreman export #{foreman_export_format} #{foreman_tmp_location} --procfile #{procfile} --app #{application} --user #{application_user} --log #{deploy_to}/log" } + set(:foreman_export_command) { "./bin/foreman export #{foreman_export_format} #{foreman_tmp_location} --procfile #{procfile} --app #{application} --user #{application_user} --log #{deploy_to}/log --env #{environment_file}" } namespace :export do # After each deployment, the startup scripts are exported if the `Procfile` has changed. @@ -71,4 +71,4 @@ module Recap::Tasks::Foreman after 'deploy:update_code', 'foreman:export:if_changed' after 'deploy:restart', 'foreman:restart' end -end \ No newline at end of file +end