mina-deploy / mina

Blazing fast deployer and server automation tool

Home Page:https://rubygems.org/gems/mina

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What's the role of "on :launch do" part of deploy.rb

erusev opened this issue · comments

What's the role of:

on :launch do
  in_path(fetch(:current_path)) do
    command %{mkdir -p tmp/}
    command %{touch tmp/restart.txt}
  end
end

Would be helpful to add a comment in the code that explains it.

on :launch is what happens after mina creates the symlink between the release path and the current folder.

Think of these on :something as steps of the deploy workflow. So after creating the symlink, you probably want to restart your server and/or services or do whatever is relevant for you.

It would be better to read the bash script here executed during the deploy to better understand what's going on.