修复bug

This commit is contained in:
2025-07-08 16:44:04 +08:00
parent aa2416c5d6
commit 1af79c4111
22 changed files with 400 additions and 1036 deletions

View File

@@ -11,11 +11,14 @@ RUN apk add --no-cache \
COPY package*.json ./
# 安装依赖
RUN npm ci
RUN npm install
# 复制源代码
COPY . .
# 构建项目
RUN npm run build
# 创建非root用户
RUN addgroup -g 1001 -S nodejs
RUN adduser -S nodejs -u 1001
@@ -30,6 +33,5 @@ EXPOSE 3000
# 健康检查
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:3000 || exit 1
# 启动命令 - 支持环境变量
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]
# 启动命令
CMD ["npm", "run", "start"]