Fork me on GitHub
Mina Command queue

Command queue

At the heart of it, Mina is merely sugar on top of Rake to queue commands and execute them remotely at the end. Take a look at this minimal deploy.rb configuration:

# config/deploy.rb
set :user, 'john'
set :domain, ''

task :logs do
  queue 'echo "Contents of the log file are as follows:"'
  queue "tail -f /var/log/apache.log"

Once you type mina logs in your terminal, it invokes the queued commands remotely on the server using the command ssh

$ mina logs --simulate
# Execute the following commands via
# ssh
echo "Contents of the log file are as follows:"
tail -f /var/log/apache.log