fix npm building and code quality issue

This commit is contained in:
Feng Yue
2025-08-31 14:08:17 +08:00
parent 01274a6a96
commit e4078e36ad
2 changed files with 218 additions and 5 deletions

View File

@@ -8,7 +8,7 @@ WORKDIR /app/web/admin-spa
COPY web/admin-spa/package*.json ./
# 🔽 安装前端依赖
RUN npm i
RUN npm ci
# 📋 复制前端源代码
COPY web/admin-spa/ ./
@@ -38,7 +38,7 @@ WORKDIR /app
COPY package*.json ./
# 🔽 安装依赖 (生产环境)
RUN npm i --only=production && \
RUN npm ci --only=production && \
npm cache clean --force
# 📋 复制应用代码
@@ -68,4 +68,4 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
# 🚀 启动应用
ENTRYPOINT ["dumb-init", "--", "/usr/local/bin/docker-entrypoint.sh"]
CMD ["node", "src/app.js"]
CMD ["node", "src/app.js"]