diff --git a/Dockerfile b/Dockerfile index 2a074bb..f318262 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,21 +14,15 @@ RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debia apt-get install -y gcc sqlite3 && \ rm -rf /var/lib/apt/lists/* -# 安装Poetry +# 复制requirements文件并安装Python依赖 +COPY requirements.txt . + +# 配置pip使用阿里云镜像源 RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ && \ pip config set global.trusted-host mirrors.aliyun.com && \ - pip install --no-cache-dir poetry + pip install --no-cache-dir -r requirements.txt # 复制项目文件 -COPY pyproject.toml poetry.lock* ./ - -# 配置Poetry使用阿里云镜像源并安装依赖 -RUN poetry config pypi-token.pypi-token "" && \ - poetry config repositories.aliyun https://mirrors.aliyun.com/pypi/simple/ && \ - poetry source add --priority=secondary aliyun https://mirrors.aliyun.com/pypi/simple/ && \ - poetry install --no-dev --no-interaction --no-ansi - -# 复制剩余的项目文件 COPY . . # 暴露端口 @@ -39,4 +33,4 @@ ENV PYTHONPATH=/app ENV PYTHONUNBUFFERED=1 # 启动命令 -CMD ["poetry", "run", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] +CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] diff --git a/poetry.lock b/poetry.lock index 56173f2..baefcc3 100644 --- a/poetry.lock +++ b/poetry.lock @@ -221,14 +221,14 @@ files = [ [[package]] name = "fastapi" -version = "0.120.1" +version = "0.120.2" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "fastapi-0.120.1-py3-none-any.whl", hash = "sha256:0e8a2c328e96c117272d8c794d3a97d205f753cc2e69dd7ee387b7488a75601f"}, - {file = "fastapi-0.120.1.tar.gz", hash = "sha256:b5c6217e9ddca6dfcf54c97986180d4a1955e10c693d74943fc5327700178bff"}, + {file = "fastapi-0.120.2-py3-none-any.whl", hash = "sha256:bedcf2c14240e43d56cb9a339b32bcf15104fe6b5897c0222603cb7ec416c8eb"}, + {file = "fastapi-0.120.2.tar.gz", hash = "sha256:4c5ab43e2a90335bbd8326d1b659eac0f3dbcc015e2af573c4f5de406232c4ac"}, ] [package.dependencies] diff --git a/public/index.html b/public/index.html index 1639109..395fbed 100644 --- a/public/index.html +++ b/public/index.html @@ -578,7 +578,7 @@