node_modules .git .gitignore .env .env.* .DS_Store npm-debug.log* yarn-debug.log* yarn-error.log* pnpm-debug.log* # Next.js build artifacts (we will copy from builder stage explicitly) .next/cache # Exclude all docs and scripts from production image docs/** scripts/** # Exclude local uploads and temp files uploads/** tmp/** temp/** # Exclude miscellaneous local files *.log *.md !README.md # 允许权威部署规范被查看 !docs/PORTABLE_DEPLOYMENT_GUIDE.md *.bat *.ps1 *.sh # VCS/IDE .vscode/** .idea/** *.swp # ============================================ # Docker 构建排除文件配置 # 只包含功能性代码和必要文件 # ============================================ # 依赖包(在 Docker 中重新安装) node_modules npm-debug.log* yarn-debug.log* yarn-error.log* .pnp .pnp.js # Next.js 构建产物(在 Docker 中重新构建) .next out build dist # 测试 coverage *.test.ts *.test.tsx *.spec.ts *.spec.tsx test tests __tests__ # 调试和日志 *.log logs *.log.* npm-debug.log* yarn-debug.log* yarn-error.log* # 本地环境变量(服务器上已有 .env) # 注意:.env.production 需要在构建时使用,所以不排除 .env.local .env.development.local .env.test.local .env.production.local .env .env.example .env.template .env*.local # 但排除其他敏感文件 server.env env-backups/ # 版本控制 .git .gitignore .gitattributes .gitmodules # IDE 和编辑器配置 .vscode .idea .cursor *.swp *.swo *.sublime-project *.sublime-workspace .editorconfig .eslintcache # 文档文件(不部署文档) docs *.md README.md LICENSE CHANGELOG.md CONTRIBUTING.md *.txt !VERSION.txt # 脚本文件(不部署脚本) scripts *.sh *.ps1 *.bat *.py *.js !next.config.js !postcss.config.js !tailwind.config.ts # 临时文件和缓存 uploads public/uploads backups *.tmp *.temp .cache .tmp tmp temp *.cache .DS_Store Thumbs.db # 压缩包和发布包 *.tar.gz *.zip *.rar *.7z *.tar *.tgz release-* dist-* deploy-artifacts # 数据库备份文件 *.sql *.db *.sqlite *.sqlite3 # 其他文件 *.rpm *.deb *.pem *.key *.cert *.crt frp_* docker-daemon-config.json # 部署相关文件 deploy.sh auto-deploy.sh update-deploy.sh deploy-to-server.sh deploy-to-server.ps1 一键部署.bat 部署前检查清单.bat 安全部署.ps1 安全部署.sh # 修复和工具脚本 修复PowerShell编码.ps1 快速修复编码.bat *.修复*.bat *.修复*.ps1 *.修复*.sh # 配置文件(保留必要的,排除开发用的) # 注意:以下文件会被包含(功能性代码) # - package.json # - package-lock.json # - Dockerfile # - docker-compose.yml # - docker-compose.prod.yml # - next.config.js # - tsconfig.json # - tailwind.config.ts # - postcss.config.js # - prisma/schema.prisma # - prisma/migrations/ (迁移文件是功能性的) # - app/ # - components/ # - lib/ # - types/ # - middleware.ts # - public/ (静态资源)