Smart Mermaid推荐使用Docker进行快速部署,具体步骤如下:
- environmental preparation:确保主机已安装Git和Docker Compose,建议使用Linux/Windows WSL2环境
- Get Code: Implementation
git clone https://github.com/liujuntao123/smart-mermaid.git && cd smart-mermaid
- 切换分支:必须切换到docker分支
git checkout docker
(主分支不含部署配置) - AI服务配置:编辑docker-compose.yml,设置:
- AI_API_URL:如OpenAI的https://api.openai.com/v1
- AI_API_KEY:有效的API密钥
- AI_MODEL_NAME:指定模型如gpt-3.5-turbo
- access control(可选):设置ACCESS_PASSWORD添加登录验证
- Starting services: Implementation
docker-compose up -d
,成功后访问http://localhost:3000
Caveats:
- 国内用户需确保能稳定访问AI API服务
- 首次启动会构建容器镜像,耗时约3-5分钟
- 生产环境建议配置Nginx反向代理并启用HTTPS
This answer comes from the articleSmart Mermaid: AI tool to quickly generate flowcharts and timing diagrams with textThe