refactor: cleanup template and add new pages
- Remove unused template files (frontend-code-interpreter, template-renderer) - Add home, test1, test2, zh-en-translator pages - Update router configuration - Add Docker and tailwind config - Update environment files and configuration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
33
Dockerfile
Normal file
33
Dockerfile
Normal file
@@ -0,0 +1,33 @@
|
||||
# ==================== 构建阶段 ====================
|
||||
FROM node:24-alpine AS builder
|
||||
WORKDIR /app
|
||||
|
||||
# 配置 npm 镜像
|
||||
RUN npm config set registry https://registry.npmmirror.com
|
||||
|
||||
# 复制依赖文件并安装
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
|
||||
# 复制源代码并构建
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# ==================== 运行阶段 ====================
|
||||
FROM node:24-alpine AS runner
|
||||
WORKDIR /app
|
||||
|
||||
# 只安装服务器依赖(独立的 package.json)
|
||||
COPY server/package.json ./
|
||||
RUN npm config set registry https://registry.npmmirror.com && npm install --omit=dev
|
||||
|
||||
# 复制构建产物
|
||||
COPY --from=builder /app/dist ./dist
|
||||
COPY --from=builder /app/server-dist ./server-dist
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
ENV PORT=3000
|
||||
ENV HOST=0.0.0.0
|
||||
|
||||
CMD ["node", "server-dist/server/index.js"]
|
||||
Reference in New Issue
Block a user