feat: 添加 Docker Hub 自动构建和改进部署体验

- 支持环境变量预设管理员账号密码
- 添加 docker-entrypoint.sh 自动初始化脚本
- 配置 GitHub Actions 自动构建多平台镜像(amd64, arm64)
- 添加版本标签管理和自动发布流程
- 集成 Trivy 安全漏洞扫描
- 更新文档说明 Docker Hub 使用方法
- 优化 Docker 部署用户体验

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
shaw
2025-07-19 00:49:04 +08:00
parent f5968e518e
commit 5c83cf1d53
12 changed files with 691 additions and 6 deletions

View File

@@ -29,6 +29,10 @@ RUN npm ci --only=production && \
# 📋 复制应用代码
COPY --chown=claude:nodejs . .
# 🔧 复制并设置启动脚本权限
COPY --chown=claude:nodejs docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# 📁 创建必要目录
RUN mkdir -p logs data temp && \
chown -R claude:nodejs logs data temp
@@ -44,5 +48,5 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:3000/health || exit 1
# 🚀 启动应用
ENTRYPOINT ["dumb-init", "--"]
ENTRYPOINT ["dumb-init", "--", "/usr/local/bin/docker-entrypoint.sh"]
CMD ["node", "src/app.js"]