From c221861995c6b7a1bcf83001ea9a3829df9b4240 Mon Sep 17 00:00:00 2001 From: Sonic Shi Date: Wed, 31 Jul 2024 11:24:14 +0800 Subject: [PATCH] change pip --index-url --- .github/workflows/deploy.yml | 2 +- requirements.txt | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 783dc4f..217479e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -29,7 +29,7 @@ jobs: git clone -b main git@github.com:shisongsong/xhm-server.git ~/apps/xhm-server/deployments/current cd ~/apps/xhm-server/deployments/current # 安装依赖 - pip3 install -r requirements.txt + pip3 install --index-url https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn -r requirements.txt # 启动或重启 Gunicorn echo "[program:app]" | sudo tee -a /etc/supervisord.d/app.conf echo "command=gunicorn --workers 3 --bind unix:/tmp/app.sock -m app:app" | sudo tee -a /etc/supervisord.d/app.conf diff --git a/requirements.txt b/requirements.txt index 107cf4e..537a142 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,11 @@ -Flask -Flask-SQLAlchemy -Flask-Migrate -Flask-WTF -Flask-JWT-Extended -wtforms -Flask-Login -flask-marshmallow -marshmallow-sqlalchemy -flask_cors -gunicorn \ No newline at end of file +Flask --index-url https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn +Flask-SQLAlchemy --index-url https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn +Flask-Migrate --index-url https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn +Flask-WTF --index-url https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn +Flask-JWT-Extended --index-url https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn +wtforms --index-url https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn +Flask-Login --index-url https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn +flask-marshmallow --index-url https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn +marshmallow-sqlalchemy --index-url https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn +flask_cors --index-url https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn +gunicorn --index-url https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn \ No newline at end of file