What's the role of "on :launch do" part of deploy.rb
erusev opened this issue · comments
Emanuil Rusev commented
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.
Wanderson Policarpo commented
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.