Files
Podcast-Generator/Dockerfile-Web
hex2077 7b641fdeff feat: 添加确认模态框并优化音频生成流程
- 新增确认生成模态框组件,支持多语言显示
- 调整音频时长选项为"5分钟左右"和"8-15分钟"
- 优化Docker配置,添加.env和config目录挂载
- 改进音频生成流程,增加静音修剪功能
- 更新多语言翻译文件,添加确认相关文本
- 修复播客内容组件中overview_content处理逻辑
- 优化中间件配置,排除robots.txt和sitemap.xml
- 完善Docker使用文档,补充挂载点说明
- 改进播客脚本提示词,增强对话深度要求
2025-08-26 21:38:00 +08:00

44 lines
1.2 KiB
Plaintext

# Stage 1: Dependency Installation and Build
FROM node:20-alpine AS builder
# Set working directory
WORKDIR /app/web
# Copy package.json and package-lock.json to leverage Docker cache
COPY web/package.json web/package-lock.json ./
# Install dependencies
RUN npm install --frozen-lockfile \
&& npm install --cpu=x64 --os=linux --libc=musl @libsql/client@latest --foreground-scripts
# Copy the rest of the application code (web directory content)
COPY web .
# Build the Next.js application
# The `standalone` output mode creates a self-contained application
ENV NEXT_TELEMETRY_DISABLED 1
RUN npm run build
# Stage 2: Production Image
FROM node:20-alpine AS runner
WORKDIR /app
# Create output directory for web/server.js to use
RUN mkdir -p server/output
RUN npm install @libsql/linux-x64-musl
# Set production environment
ENV NODE_ENV production
COPY web/sqlite.db ./web/sqlite.db
# Copy standalone application and public assets from the builder stage
COPY --from=builder /app/web/.next/standalone ./web/
COPY --from=builder /app/web/.next/static ./web/.next/static
COPY --from=builder /app/web/public ./web/public
# Expose port (Next.js default port)
EXPOSE 3000
# Start the Next.js application
CMD ["node", "web/server.js"]