Files
test1/Dockerfile
shangzy 026e33a08a 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>
2026-01-07 15:08:02 +08:00

33 lines
769 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ==================== 构建阶段 ====================
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"]