yuzhen_base/README.md

42 lines
1.3 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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.

# 软采基础镜像
包含dotnet 3.1 运行时i386 架构支持nats-server运行管理,可上线UIOT平台支持部署远程访问
### 编译
`docker build -t gitiot.mgm-iot.com/iot_images/yuzhen_base:vx.x.x .`
`docker build -t swr.cn-north-4.myhuaweicloud.com/cloud-yuzhen/yuzhen_base:vx.x.x ./`
### docker 运行命令
`docker run -d --name yzcol --restart always -v /etc/localtime:/etc/localtime gitiot.mgm-iot.com/iot_images/yuzhen_base:v1.0.4`
* -p 51001:51001/udp ,透传UDP端口
* -p 51001-51099:51001-51099/udp ,透传UDP端口
* -v 挂在配置文件
* --name 容器名称,便于查找
* --restart always ,自动重启
* -d 后台运行
* -v /etc/localtime:/etc/localtime ,保持和主机相同时区
### 设置自动重启
`docker update --restart=always ${CONTAINER}`
### 批量部署
使用 generate_files.py 脚本,修改脚本中内容:
1. csv_line 内容中的平台信息
2. START_SN  其实虚拟网关序列号
3. COUNT 要生成的虚拟网关个数
执行Python脚本 python3 generate_files.py
同时启动过多容器可能会导致注册异常可使用如下Python脚本按顺序延时启动python3 deploy.py
### 更新日志
2024-12-10 09:52:45 factory升级v1.1.9
2024-12-20 17:46:40 支持批量部署。