This commit is contained in:
WinJay 2026-05-28 17:28:06 -04:00 committed by GitHub
commit 6884bf85f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 8 deletions

View File

@ -1,12 +1,13 @@
FROM python:3.11
# 安装 Node.js (满足 >=18及必要工具
RUN apt-get update \
RUN sed -i 's|deb.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources \
&& apt-get update \
&& apt-get install -y --no-install-recommends nodejs npm \
&& rm -rf /var/lib/apt/lists/*
# 从 uv 官方镜像复制 uv
COPY --from=ghcr.io/astral-sh/uv:0.9.26 /uv /uvx /bin/
# 通过 pip 安装 uv替代直接拉取 ghcr.io 官方镜像,避免国内网络卡顿)
RUN pip install -i https://mirrors.aliyun.com/pypi/simple/ uv
WORKDIR /app
@ -15,10 +16,11 @@ COPY package.json package-lock.json ./
COPY frontend/package.json frontend/package-lock.json ./frontend/
COPY backend/pyproject.toml backend/uv.lock ./backend/
# 安装依赖Node + Python
RUN npm ci \
# 安装依赖Node + Python配置国内加速源
RUN npm config set registry https://registry.npmmirror.com \
&& npm ci \
&& npm ci --prefix frontend \
&& cd backend && uv sync --frozen
&& cd backend && env UV_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/ uv sync --frozen
# 复制项目源码
COPY . .

View File

@ -3,7 +3,7 @@ import i18n from '../i18n'
// 创建axios实例
const service = axios.create({
baseURL: import.meta.env.VITE_API_BASE_URL || 'http://localhost:5001',
baseURL: import.meta.env.VITE_API_BASE_URL || '',
timeout: 300000, // 5分钟超时本体生成可能需要较长时间
headers: {
'Content-Type': 'application/json'

View File

@ -13,7 +13,6 @@ export default defineConfig({
},
server: {
port: 3000,
open: true,
proxy: {
'/api': {
target: 'http://localhost:5001',