Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Foreman rbenv sudo problem and upstart script which point to tmp dir #207

Closed
roccogalluzzo opened this issue Jul 8, 2014 · 1 comment
Closed

Comments

@roccogalluzzo
Copy link

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
@d4be4st
Copy link
Member

d4be4st commented Jul 8, 2016

moved foreman to https://github.com/mina-deploy/mina-foreman

@d4be4st d4be4st closed this as completed Jul 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants