3ad430e3e3
支持两种部署模式,兼容新建 MySQL 和现有 MySQL: - Dockerfile:Python 3.12-slim 两阶段构建,非 root 运行 - docker-compose.yml:全栈模式(含 MySQL 8.0 + 可选 Nginx) - docker-compose.external-db.yml:接入现有 MySQL 模式 - docker/entrypoint.sh:自动等待 DB 就绪 → 初始化表 → 启动 Gunicorn - docker/nginx.conf:反向代理 + 静态文件直出 + 安全响应头 - .env.docker.example / .env.external-db.example:各模式配置示例 - .gitattributes:确保 entrypoint.sh 在 Windows 上保持 LF 换行 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
15 lines
269 B
Plaintext
15 lines
269 B
Plaintext
# 强制 Shell 脚本使用 LF(在 Windows 上构建 Linux 镜像时必须)
|
|
docker/entrypoint.sh text eol=lf
|
|
*.sh text eol=lf
|
|
|
|
# 普通文件使用系统默认换行
|
|
*.py text
|
|
*.html text
|
|
*.css text
|
|
*.js text
|
|
*.md text
|
|
*.yml text
|
|
*.yaml text
|
|
*.txt text
|
|
*.json text
|