- docker-compose.yml: backend + frontend 两服务,挂 NPM 所在外部网络、不暴露宿主端口; data/uploads 用 bind mount 持久化(deploy/ 下,gitignored) - backend/Dockerfile: python:3.12-slim + 清华 PyPI 镜像(ARG 可覆盖) - frontend/Dockerfile: 多阶段 node:22 + npm ci + next build(NEXT_PUBLIC_API_BASE 构建期 注入,npmmirror 默认)→ next start - .env.example: 全量部署环境变量模板(compose 替换变量 + 后端密钥) - deploy/README.md: 服务器部署手册(NPM 配置 / DNS / 数据迁移 / 运维 / 大陆网络) Co-Authored-By: Claude Code <noreply@anthropic.com>
40 lines
469 B
Plaintext
40 lines
469 B
Plaintext
# Local configuration and credentials
|
|
.env
|
|
.env.*
|
|
!.env.example
|
|
*.pem
|
|
*.key
|
|
|
|
# Python
|
|
.venv/
|
|
venv/
|
|
__pycache__/
|
|
*.py[cod]
|
|
.pytest_cache/
|
|
|
|
# Dependencies and generated output
|
|
node_modules/
|
|
.next/
|
|
out/
|
|
build/
|
|
coverage/
|
|
*.tsbuildinfo
|
|
next-env.d.ts
|
|
|
|
# Local application data (includes book files and saved model credentials)
|
|
backend/data/
|
|
backend/uploads/
|
|
deploy/data/
|
|
deploy/uploads/
|
|
*.db
|
|
*.db-*
|
|
*.sqlite*
|
|
*.epub
|
|
|
|
# Local tooling
|
|
.idea/
|
|
.vscode/
|
|
.DS_Store
|
|
Thumbs.db
|
|
*.log
|