Heroku 有个功能,当 push 本地变化到 remote repository 以后,gems 自动重装,rails webserver 会自动重启。我的生产环境是 ubuntu+nginx+puma+git,请教如何实现类似效果以重启 puma 呢?
我看到网上有人在/var/git/myproject.git/hooks/post-update 这样写。
#!/bin/sh
echo
echo "**** Pulling changes into Live [Linode's post-update hook]"
echo
cd /var/www/myproject || exit
unset GIT_DIR
git pull linode master
bundle install
sudo service nginx reload
exec git-update-server-info
但是没有如何加入重启 puma 的命令?谢谢!