build.sh: Install requirements first.

Hui Lan 2023-03-21 16:07:10 +08:00
parent b34f260d98
commit 691c5b0d43
2 changed files with 5 additions and 1 deletions

View File

@ -114,5 +114,5 @@ def get_users():
def update_user_password(username, password="123456"): def update_user_password(username, password="123456"):
with db_session: with db_session:
if user := User.select(name=username).first(): if if user := User.select(name=username).first():
user.password = md5(username + password) user.password = md5(username + password)

View File

@ -3,6 +3,10 @@
DEPLOYMENT_DIR=/home/lanhui/englishpal2/EnglishPal DEPLOYMENT_DIR=/home/lanhui/englishpal2/EnglishPal
cd $DEPLOYMENT_DIR cd $DEPLOYMENT_DIR
# Install dependencies
pip3 install -r requirements.txt
# Stop service # Stop service
sudo docker stop EnglishPal sudo docker stop EnglishPal
sudo docker rm EnglishPal sudo docker rm EnglishPal