mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-22 16:43:35 +00:00
chore: 更新项目配置文件
- 更新 Docker 配置和构建脚本 - 优化项目文档和部署脚本 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
23
Dockerfile
23
Dockerfile
@@ -1,4 +1,22 @@
|
||||
# 🐳 使用官方 Node.js 18 Alpine 镜像
|
||||
# 🎯 前端构建阶段
|
||||
FROM node:18-alpine AS frontend-builder
|
||||
|
||||
# 📁 设置工作目录
|
||||
WORKDIR /app/web/admin-spa
|
||||
|
||||
# 📦 复制前端依赖文件
|
||||
COPY web/admin-spa/package*.json ./
|
||||
|
||||
# 🔽 安装前端依赖
|
||||
RUN npm ci
|
||||
|
||||
# 📋 复制前端源代码
|
||||
COPY web/admin-spa/ ./
|
||||
|
||||
# 🏗️ 构建前端
|
||||
RUN npm run build
|
||||
|
||||
# 🐳 主应用阶段
|
||||
FROM node:18-alpine
|
||||
|
||||
# 📋 设置标签
|
||||
@@ -26,6 +44,9 @@ RUN npm ci --only=production && \
|
||||
# 📋 复制应用代码
|
||||
COPY . .
|
||||
|
||||
# 📦 从构建阶段复制前端产物
|
||||
COPY --from=frontend-builder /app/web/admin-spa/dist /app/web/admin-spa/dist
|
||||
|
||||
# 🔧 复制并设置启动脚本权限
|
||||
COPY docker-entrypoint.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||
|
||||
Reference in New Issue
Block a user