This commit is contained in:
浪子 2025-12-29 18:25:36 +08:00
parent 83f3415084
commit eefa8daa4f
4 changed files with 33 additions and 4 deletions

13
backend/.dockerignore Normal file
View File

@ -0,0 +1,13 @@
node_modules
npm-debug.log
.env
.git
.gitignore
README.md
.DS_Store
*.md
.vscode
.idea
dist
build
coverage

View File

@ -6,8 +6,8 @@ WORKDIR /app
# 复制package文件
COPY package*.json ./
# 安装依赖
RUN npm ci --only=production
# 安装依赖(使用 install 而不是 ci
RUN npm install --only=production
# 复制源代码
COPY src ./src

16
frontend/.dockerignore Normal file
View File

@ -0,0 +1,16 @@
node_modules
npm-debug.log
.env
.git
.gitignore
README.md
.DS_Store
*.md
.vscode
.idea
build
coverage
.env.local
.env.development.local
.env.test.local
.env.production.local

View File

@ -6,8 +6,8 @@ WORKDIR /app
# 复制package文件
COPY package*.json ./
# 安装依赖
RUN npm ci
# 安装依赖(使用 install 而不是 ci允许更新 lock 文件)
RUN npm install --legacy-peer-deps
# 复制源代码
COPY . .