Skip to main content

如何部署IoTSharp?

本教程使用rabbit_mongo_influx 方式进行部署

修改docker-compose.yml文件

注意

influxdb_cli容器的相关配置,通过此命令行容器,初始化influxdb, 初始化之前需要提前设置好token等,如果自己自行配置, 则直接删除此配置即可。

/IoTSharp/Deployments/rabbit_mongo_influx/docker-compose.yml
influxdb_cli:
links:
- influx
image: quay.io/influxdb/influxdb:v2.0.4
entrypoint: influx setup --bucket iotsharp-bucket -t iotsharp-token -o iotsharp --username=root --password=1-q2-w3-e4-r5-t --host=http://influx:8086 -f
restart: on-failure:20
depends_on:
- influx

启动容器

进入/IoTSharp/Deployments/rabbit_mongo_influx,执行

docker-compose up -d

看到下图说明运行成功 docker-compose启动成功

初始化influxdb

浏览器访问 http://localhost:8086/,初始化influxdb

初始化influxdb

Org: iotsharp Bucket: iotsharp-bucket

然后点Config Later

创建token

添加token

复制token

复制token

修改配置文件

/IoTSharp/Deployments/rabbit_mongo_influx/appsettings.Production.json
"TelemetryStorage":"http://influx:8086/?org=iotsharp&bucket=iotsharp-bucket&token=iotsharp-token&&latest=-72h",

iotsharp-token修改为你的真实token

重启IoTSharp容器

命令行执行

docker restart iotsharp

注册

Chrome浏览器访问 http://localhost:2927/

注册

访问

注册后登入进入首页 访问