Commit ce652399 by imwangxiaozhou

build(dockerfile): 修改Dockerfile构建配置并添加阿里云PyPI镜像源

将前端构建命令从npm run build调整为npx vite build,为pip安装添加阿里云PyPI镜像源加速依赖下载,同时存在意外的dump.rdb二进制文件变更
1 parent d5aae062
...@@ -4,7 +4,7 @@ WORKDIR /app ...@@ -4,7 +4,7 @@ WORKDIR /app
COPY frontend/package.json frontend/package-lock.json ./ COPY frontend/package.json frontend/package-lock.json ./
RUN npm ci RUN npm ci
COPY frontend/ . COPY frontend/ .
RUN npm run build RUN npx vite build
# ---- Runtime Stage ---- # ---- Runtime Stage ----
FROM python:3.12-slim FROM python:3.12-slim
...@@ -18,7 +18,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ ...@@ -18,7 +18,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
# Copy backend # Copy backend
COPY backend/requirements.txt . COPY backend/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt RUN pip install --no-cache-dir -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
COPY backend/ ./backend/ COPY backend/ ./backend/
# Copy frontend build # Copy frontend build
......
No preview for this file type
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!