新しく構築された nginx サーバーは最新の git コードを自動的に更新します - パゴダ

シナリオ
Tencent Cloud の自動スケーリングを使用する場合。使用されるイメージは最新の git コードに自動的に更新されないため、作成したばかりのサーバーのコードを最新の git コードに更新するプログラムを作成する必要があります。

オペレーション
ここに画像の説明を挿入を作成する前に、対応する git コンテンツが必要です

#开机自动更新git数据
cd /www/wwwroot/yunxc/yunxc && sudo -u www git pull
cd /www/wwwroot/yunxc_h5/yunxc_Applet && sudo -u www git pull
cd /www/wwwroot/yunxc_pc/yunlive_pc/YunlivePc_new && sudo -u www git pull
cd /www/wwwroot/yunxc_sonly/sonly && sudo -u www git pull
cd /www/wwwroot/yunxc_admin_elm/yunxc-admin/ && sudo -u www git pull

2. 以前に作成したプログラムをスタートアップ項目に追加します。
ここに画像の説明を挿入3. nginx を保存して再起動して有効にします。
ここに画像の説明を挿入

おすすめ

転載: blog.csdn.net/weixin_42021688/article/details/128559824