There is a plugin called mina-nginx which is overkill all I am trying to do is restart my nginx after I deploy my sinatra app. I have this code
require 'mina/rails'
require 'mina/git'
# require 'mina/rbenv' # for rbenv support. (https://rbenv.org)
require 'mina/rvm' # for rvm support. (https://rvm.io)
set :domain, 'dot'
set :deploy_to, 'foo'
set :repository, 'bar'
#set :repository, 'biz'
set :branch, 'master'
set :forward_agent, true # SSH forward_agent.
# This task is the environment that is loaded for all remote run commands, such as
# `mina deploy` or `mina rake`.
task :environment do
invoke :'rvm:use', 'ruby-2.3.1'
end
# Put any custom commands you need to run at setup
# All paths in `shared_dirs` and `shared_paths` will be created on their own.
task :setup do
command %{ gem install bundler }
# command %{rbenv install 2.3.0}
end
desc "Deploys the current version to the server."
task :deploy do
deploy do
# Put things that will set up an empty directory into a fully set-up
# instance of your project.
invoke :'git:clone'
invoke :'bundle:install'
invoke :'deploy:cleanup'
invoke :restart
end
end
task :restart do
comment "Restarting Nginx Server"
command "sudo service nginx restart"
end
Now every time I try to run my restart command it doesn't work. It hangs on the sudo service nginx restart because it's waiting for a password to be entered by why do I need a password if I am using ssh forwarding?
There is a plugin called mina-nginx which is overkill all I am trying to do is restart my nginx after I deploy my sinatra app. I have this code
Now every time I try to run my restart command it doesn't work. It hangs on the sudo service nginx restart because it's waiting for a password to be entered by why do I need a password if I am using ssh forwarding?