Created
February 10, 2018 07:27
-
-
Save yiyizym/65b246cc2621fb1810a437906d52c37a to your computer and use it in GitHub Desktop.
waraimasu_deploy.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
root_dir='/home/admin/waraimasu/' | |
echo "跳转到根目录 ${root_dir}" | |
cd $root_dir | |
echo "ok" | |
echo "拉 master 最新代码" | |
git pull origin master | |
echo "ok" | |
echo "重新编译静态资源" | |
RAILS_ENV=production NODE_ENV=production rake assets:precompile | |
echo "ok" | |
echo "杀死之前的 puma 进程" | |
ps -ef | grep PROCESS | grep -v grep | awk '{print $2}' | xargs kill -9 | |
echo "ok" | |
echo "重启 puma" | |
RAILS_ENV=production puma -d | |
echo "ok" | |
echo "done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment