优化启动与更新脚本

This commit is contained in:
ngfchl
2022-10-10 17:01:10 +08:00
parent 2a83925929
commit 236dfbfefa
2 changed files with 31 additions and 31 deletions

View File

@@ -1,7 +1,6 @@
# 先备份数据库文件再拉取更新 $(date "+%Y%m%d%H%M%S")当前时间年月日时分秒
cp /var/www/html/ptools/db/db.sqlite3 /var/www/html/ptools/db/db.sqlite3-$(date "+%Y%m%d%H%M%S") &&
git pull origin $DEV &&
cp -f /var/www/html/ptools/start.sh /var/www/html/start.sh &&
pip install -r requirements.txt -U &&
python manage.py makemigrations &&
python manage.py migrate
cp /var/www/html/ptools/db/db.sqlite3 /var/www/html/ptools/db/db.sqlite3-$(date "+%Y%m%d%H%M%S")
git pull
pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate