Hi,
mina/foreman execute commands with sudo, but when used with rbenv fail, more info (if someone confirm that is not a problem with my environment I can send a pull request to resolve)
For now have pasted foreman.rb inside my deploy file and edited tasks to use rbenv sudo. Now there a new problem, don't know if correlated, Foreman create upstart script that before start server cd into 'deploy/to/path/tmp/build-140480388413740`.
This dir think is used as temp dir by mina during deploy, but now not exist, should not point to the current dir?
If run with simulate params passed to foreman export seems to be correct:
echo "-----> Exporting foreman procfile for app_name"
echo \$\ rbenv\ sudo\ cd\ /to/deploy/path/current\ \;\ rbenv\ sudo\ bundle\ exec\ foreman\ export\ upstart\ /etc/init\ -a\ app_name\ -u\ deployer\ -l\ /to/deploy/path/shared/log &&
rbenv sudo cd /to/deploy/path/current ; rbenv sudo bundle exec foreman export upstart /etc/init -a app_name -u deployer -l /to/deploy/path/shared/log
If is useful, deploy task(is the same of the docs):
task :deploy => :environment do
deploy do
invoke :'git:clone'
invoke :'deploy:link_shared_paths'
invoke :'bundle:install'
invoke 'foreman:export'
invoke :'rails:db_migrate'
to :launch do
invoke 'foreman:restart'
end
end
Hi,
mina/foremanexecute commands with sudo, but when used withrbenvfail, more info (if someone confirm that is not a problem with my environment I can send a pull request to resolve)For now have pasted foreman.rb inside my deploy file and edited tasks to use
rbenv sudo. Now there a new problem, don't know if correlated, Foreman create upstart script that before start server cd into 'deploy/to/path/tmp/build-140480388413740`.This dir think is used as temp dir by mina during deploy, but now not exist, should not point to the current dir?
If run with simulate params passed to foreman export seems to be correct:
If is useful, deploy task(is the same of the docs):