feat(server): 添加pip镜像源配置支持

添加清华PyPI镜像源配置选项到环境变量文件,包括
PIP_INDEX_URL、PIP_TRUSTED_HOST和PIP_DEFAULT_TIMEOUT参数,
用于加速Docker构建过程中的包安装速度。

在docker-compose.yml中将这些参数作为构建参数传递给
Docker容器,并在Dockerfile中接收并设置为环境变量,
同时移除pip install的--no-cache-dir参数以利用缓存。
This commit is contained in:
2026-05-09 17:44:22 +08:00
parent 3df8fcacbc
commit 19db342507
3 changed files with 16 additions and 1 deletions
+3
View File
@@ -19,6 +19,9 @@ S3_SECRET_KEY=change-me-minio-password
S3_BUCKET=ciyuan-viewfinder
# Server
PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
PIP_TRUSTED_HOST=pypi.tuna.tsinghua.edu.cn
PIP_DEFAULT_TIMEOUT=120
DATABASE_URL=postgresql+asyncpg://shiran:change-me-postgres-password@postgres:5432/ciyuan_viewfinder
DATABASE_URL_SYNC=postgresql://shiran:change-me-postgres-password@postgres:5432/ciyuan_viewfinder
SECRET_KEY=change-me-before-production