summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2013-02-09 20:17:48 +0100
committerAzul <azul@riseup.net>2013-02-09 20:17:48 +0100
commit1a2789d084c3c2beccb97726b8799cb194a634fd (patch)
tree1a9ac6a1fbbf967cd4b52dffe99f8cec25f19ec9
parent6e3d87d88578447aa4358aabdf270df2082b422d (diff)
run bundler and rake assets:precompile as normal user
otherwise the generated files will be owned by root and the bundle will be inside roots /home/max
-rw-r--r--puppet/modules/site_webapp/manifests/init.pp4
1 files changed, 3 insertions, 1 deletions
diff --git a/puppet/modules/site_webapp/manifests/init.pp b/puppet/modules/site_webapp/manifests/init.pp
index f0d6c90a..46cc0ed6 100644
--- a/puppet/modules/site_webapp/manifests/init.pp
+++ b/puppet/modules/site_webapp/manifests/init.pp
@@ -52,8 +52,9 @@ class site_webapp {
exec { 'bundler_update':
cwd => '/srv/leap-webapp',
- command => '/bin/bash -c "/usr/bin/bundle check || /usr/bin/bundle install"',
+ command => '/bin/bash -c "/usr/bin/bundle check || /usr/bin/bundle install --path vendor/bundle"',
unless => '/usr/bin/bundle check',
+ user => 'leap-webapp',
timeout => 600,
require => [ Class['bundler::install'], Vcsrepo['/srv/leap-webapp'] ],
notify => Service['apache'];
@@ -62,6 +63,7 @@ class site_webapp {
exec { 'compile_assets':
cwd => '/srv/leap-webapp',
command => '/bin/bash -c "/usr/bin/bundle exec rake assets:precompile"',
+ user => 'leap-webapp',
require => Exec['bundler_update'],
notify => Service['apache'];
}