- 新增 backend/Dockerfile + frontend/Dockerfile (多阶段构建) - 新增 docker-compose.yml (postgres + redis + backend + frontend) - 新增 .env.example 模板 (前后端) - 新增 export API: 任务数据导出 + 审计日志导出 (CSV + 流式响应) - 安全加固: CORS 从环境变量配置, 安全 headers 中间件 - 生产环境自动禁用 API 文档 (Swagger/Redoc) - 添加 ENVIRONMENT, CORS_ORIGINS 配置项 - 前端启用 Next.js standalone 输出模式 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
26 lines
482 B
JavaScript
26 lines
482 B
JavaScript
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
reactStrictMode: true,
|
|
|
|
// Docker 部署时使用 standalone 输出模式
|
|
output: 'standalone',
|
|
|
|
// 环境变量
|
|
env: {
|
|
API_BASE_URL: process.env.API_BASE_URL || 'http://localhost:8000',
|
|
},
|
|
|
|
// 图片域名白名单
|
|
images: {
|
|
domains: ['localhost'],
|
|
},
|
|
|
|
// 实验性功能
|
|
experimental: {
|
|
// 服务端组件
|
|
serverComponentsExternalPackages: [],
|
|
},
|
|
}
|
|
|
|
module.exports = nextConfig
|