Skip to content

Commit

Permalink
Add a HOME to db migrate command in omnibus
Browse files Browse the repository at this point in the history
Our calls to `bundle exec` in the omnibus install need to have a HOME set
because of an updated rb-readline that requires it.[1] This is related to
28345e92, where a HOME was added to the runit startup scripts for rails
and sidekiq. This is the only other `bundle exec` in the omnibus cookbook
and so it needs a HOME, too.

[1] ConnorAtherton/rb-readline#8

Signed-off-by: Robb Kidd <rkidd@chef.io>
  • Loading branch information
robbkidd committed Jul 27, 2016
1 parent f0c8bab commit 76a5bad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion omnibus/cookbooks/omnibus-supermarket/recipes/database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@
execute 'database schema' do
command 'bundle exec rake db:migrate db:seed'
cwd node['supermarket']['app_directory']
env 'RAILS_ENV' => 'production'
environment({
'RAILS_ENV' => 'production',
'HOME' => node['supermarket']['app_directory']
})
user node['supermarket']['user']
end

0 comments on commit 76a5bad

Please sign in to comment.