iotsaas/docker/README.md
2995840376 0ce191c448 chore: 初始化 iotsaas 版本库基线
纳入范围:
- backend/  Spring Boot 多模块后端(iot-common/device/rule/data/alarm/auth)
- frontend/admin/  Vue3 + Element Plus 管理后台
- Android/   涂鸦原生 APP (com.xhai.iot)
- backend/sql/  Flyway 风格迁移脚本(V2~V21)
- docs/       对接文档与设计文档

排除范围:
- 构建产物: node_modules/ target/ build/ dist/ .gradle/
- 签名密钥: *.jks *.keystore (严禁入库)
- 本机配置: Android/local.properties
- 运行日志: logs/ *.log
- AI 协作本地数据 .codebuddy/ 与第三方 demo tuya-demo/

.gitattributes 统一以 LF 存储, Windows 批处理保留 CRLF
2026-10-27 12:00:41 +08:00

80 lines
1.5 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Docker 快速启动指南
## 环境要求
- Docker 20.10+
- Docker Compose 2.0+
## 快速启动
### 1. 启动所有服务
```bash
docker-compose up -d
```
### 2. 查看服务状态
```bash
docker-compose ps
```
### 3. 查看日志
```bash
# 查看所有服务日志
docker-compose logs -f
# 查看特定服务日志
docker-compose logs -f mysql
docker-compose logs -f redis
docker-compose logs -f emqx
```
## 服务访问地址
| 服务 | 地址 | 用户名 | 密码 |
|------|------|--------|------|
| MySQL | localhost:3306 | root | root |
| Redis | localhost:6379 | - | - |
| RabbitMQ管理界面 | http://localhost:15672 | guest | guest |
| EMQX Dashboard | http://localhost:18083 | admin | public |
| InfluxDB | http://localhost:8086 | admin | admin123456 |
| XXL-Job管理界面 | http://localhost:8080/xxl-job-admin | admin | 123456 |
| Grafana | http://localhost:3000 | admin | admin |
| MQTT Broker | tcp://localhost:1883 | admin | public |
## 停止服务
```bash
# 停止所有服务
docker-compose down
# 停止并删除数据卷
docker-compose down -v
```
## 重启服务
```bash
docker-compose restart [service_name]
```
## 数据持久化
所有服务的数据都存储在Docker Volume中,停止容器不会丢失数据。
如果需要完全清除所有数据:
```bash
docker-compose down -v
docker system prune -a
```
## 注意事项
1. 首次启动MySQL会自动执行初始化脚本
2. EMQX默认密码是public,生产环境请修改
3. InfluxDB的数据保留时间为30天
4. XXL-Job的调度任务需要在管理界面配置