更新环境变量获取方式

This commit is contained in:
fatwang2
2024-03-18 00:30:42 +08:00
parent 4b317ef088
commit 16cf2bf653
4 changed files with 17 additions and 39 deletions
-25
View File
@@ -1,25 +0,0 @@
# 使用官方 Python 基础镜像
FROM python:3.9
# 安装 Node.js
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get install -y nodejs
# 设置工作目录
WORKDIR /
# 将当前目录内容复制到容器的 / 目录
COPY . /
# 安装 Python 依赖
RUN pip install --no-cache-dir -r requirements.txt
# 切换到 web 目录,安装 Node.js 依赖并构建 web 应用
WORKDIR /web
RUN npm install && npm run build
# 切换回根目录
WORKDIR /
# 运行 Python 服务器
CMD ["python", "search4all.py"]