CentOs 一键部署脚本开发
分类专栏: Tool&
简介 方便小项目开发。
<p>mkdir update.sh</p><p>// 自动化部署前端</p><pre class="ql-syntax" spellcheck="false">echo "start updating frontend..."
cd /home/web/vue
</pre><p><br></p><pre class="ql-syntax" spellcheck="false">echo "updating source..."
git pull
</pre><p><br></p><pre class="ql-syntax" spellcheck="false">echo "frontend build..."
npm run build
</pre><p><br></p><pre class="ql-syntax" spellcheck="false">echo "frontend publish..."
rm -rf ~/nginx/web/vue
</pre><p><br></p><pre class="ql-syntax" spellcheck="false">mv dist ~/nginx/web/vue
echo "finish updating fronted..."
</pre><p><br></p><p><br></p><p>// 自动化部署node后端</p><pre class="ql-syntax" spellcheck="false">echo "start updating backend..."
cd /home/web/node_api
</pre><p><br></p><pre class="ql-syntax" spellcheck="false">echo "updating source..."
git pull
</pre><p><br></p><pre class="ql-syntax" spellcheck="false">echo "stopping service..."
kill -9 `ps -ef|grep node|grep app.js|awk '{print $2}'`
</pre><p><br></p><pre class="ql-syntax" spellcheck="false">echo "restarting service..."
node app.js &
</pre><p><br></p><pre class="ql-syntax" spellcheck="false">echo "finish updating backend..."
</pre><p><br></p><p><br></p><p><br></p><p><br></p><p><br></p>
分享到:
转载:
喜欢 0
收藏
暂无评论信息
- 相关文章
- 文章推荐
-
jQuery 3.0正式发布
jQuery 基金会刚刚发布了该 Java 框架的 3.0 版本,并且首次抛弃了对老旧的 IE 浏览器的支持。jQuery 3.0 的工作始于 2014 年 10 月,其最初目标是在 2.0 版本之上进行完善,并和遥远的 1.0 版代码说再见——因为要兼容 IE 的缘故,其已经臃肿不堪。jQuery 2.0 已经与 1.0 版本完全不兼容,而 3.0 也将继续这一路线。
-
Node 配置sequelize + mysql,根据模型自动创建数据库表
研究了一下午的node + sequelize + mysql。
-
眼镜试戴的装饰效果
开发眼镜类产品的时候需要使用试戴的功能,这里就有你需要的学习资料哦!
-
Docker 常用命令
docker目前代替虚拟机使用的一个容器,灵活好用。
- 点击排行
- 站长推荐
- 猜你喜欢
- 网站信息
- 站内问答:12篇
- 站内文章:213篇
- 建站时间:已运行1267天
- 备案号: 浙ICP备2022018799号
- 语言:
- English(USA)
- French(FR)
- Chinese(ZH)
无数据