fix: 单仓后统一版本号与访问地址说明
- 编排与文档里的 app 镜像 tag 由 v1.0.2 统一为 v1.0.4(单仓一个发布版本, v1.0.4 包含 app 线,不再保留源仓的历史 tag 差异) - deploy/README.md、docs/deploy/install.md 明确业务端口默认只绑 127.0.0.1, 并给出对外访问的两种做法(with-nginx profile / 改绑定) - mirror-to-gitee 增加推送后校验:远端 main 与本地不一致则判失败
This commit is contained in:
@@ -69,6 +69,17 @@ jobs:
|
||||
echo "----- 推送尝试 $attempt/5"
|
||||
if git push --mirror "https://${DST_USER}:${DST_TOKEN}@${DST}" 2>&1; then
|
||||
echo "✅ 已同步到 Gitee"
|
||||
|
||||
# 推送后校验:远端 main 必须与本地一致,否则判定失败(避免“绿了但其实没推上去”)
|
||||
LOCAL_MAIN=$(git rev-parse refs/heads/main 2>/dev/null || true)
|
||||
REMOTE_MAIN=$(git ls-remote "https://${DST_USER}:${DST_TOKEN}@${DST}" refs/heads/main | awk '{print $1}')
|
||||
echo "本地 main: ${LOCAL_MAIN:-<无>}"
|
||||
echo "远端 main: ${REMOTE_MAIN:-<无>}"
|
||||
if [ -n "$LOCAL_MAIN" ] && [ "$LOCAL_MAIN" != "$REMOTE_MAIN" ]; then
|
||||
echo "❌ 校验失败:远端 main 与本地不一致"
|
||||
exit 1
|
||||
fi
|
||||
echo "✅ 校验通过:Gitee 端 main 已对齐"
|
||||
exit 0
|
||||
fi
|
||||
wait_s=$((attempt * 30))
|
||||
|
||||
+6
-4
@@ -18,7 +18,7 @@ docker compose up -d
|
||||
docker compose logs -f mysql
|
||||
```
|
||||
|
||||
启动完成后访问 `http://<宿主机IP>:8009`:
|
||||
启动完成后在本机访问 `http://127.0.0.1:8009`(编排默认把业务端口绑定在 127.0.0.1,需要局域网/公网访问见下方「重要提示」):
|
||||
|
||||
| 项 | 值 |
|
||||
| --- | --- |
|
||||
@@ -49,12 +49,12 @@ docker compose --profile with-nginx up -d # 自带反向代理
|
||||
crpi-.../iotlcm/iotlcm:mysql-8.0
|
||||
crpi-.../iotlcm/iotlcm:redis-7.2
|
||||
crpi-.../iotlcm/iotlcm:iotlcm-admin-svr-v1.0.4
|
||||
crpi-.../iotlcm/iotlcm:iotlcm-app-server-v1.0.2
|
||||
crpi-.../iotlcm/iotlcm:iotlcm-app-server-v1.0.4
|
||||
```
|
||||
|
||||
tag 格式统一为 **`<服务名>-<版本>`**。
|
||||
|
||||
当前业务版本:大部分服务为 `v1.0.4`,`iotlcm-app-server` / `iotlcm-app-web` 为 `v1.0.2`(源仓最新 tag 就是 v1.0.2)。
|
||||
当前业务版本:全部服务为 `v1.0.4`(单仓统一版本号 —— 平台 v1.0.4 发布包含全部服务)。
|
||||
|
||||
升级时在 `docker-compose.yml` 中同步更新 tag 的版本部分,不要改用 `latest`。
|
||||
|
||||
@@ -122,7 +122,9 @@ TDengine 版本为 `3.3.6.13`(公开镜像可得),生产用的是 `3.4.0.9
|
||||
- **`JWT_SIGNING_KEY` 必须在 `admin-svr`、`openapi`、`app-server` 三者间完全一致**,否则令牌跨服务不通
|
||||
- **镜像标签不要用 `latest`**,生产环境请固定到具体版本
|
||||
- **改 `schema/` 下的脚本不会自动生效**,需要清空 `data/mysql` 重新初始化(会丢失全部数据)
|
||||
- 默认只监听 `127.0.0.1` 的服务需通过反向代理对外
|
||||
- 业务端口默认只绑定 `127.0.0.1`(admin-ui/admin-svr/openapi/app-web/docs/sms),要从其他机器访问,二选一:
|
||||
- 用 `--profile with-nginx` 起自带反向代理(对外 80,按域名/路径分流,配置见 `config/nginx/iotlcm.conf`)
|
||||
- 或把 `docker-compose.yml` 里对应服务的 `127.0.0.1:xxxx` 改成 `0.0.0.0:xxxx`(需自备防火墙策略)
|
||||
|
||||
## 许可
|
||||
|
||||
|
||||
@@ -285,7 +285,7 @@ services:
|
||||
condition: service_healthy
|
||||
|
||||
app-server:
|
||||
image: 'crpi-qflrqrxoohlkkvgc.cn-chengdu.personal.cr.aliyuncs.com/iotlcm/iotlcm:iotlcm-app-server-v1.0.2'
|
||||
image: 'crpi-qflrqrxoohlkkvgc.cn-chengdu.personal.cr.aliyuncs.com/iotlcm/iotlcm:iotlcm-app-server-v1.0.4'
|
||||
container_name: iotlcm-app-server
|
||||
restart: always
|
||||
ports:
|
||||
@@ -306,7 +306,7 @@ services:
|
||||
condition: service_healthy
|
||||
|
||||
app-web:
|
||||
image: 'crpi-qflrqrxoohlkkvgc.cn-chengdu.personal.cr.aliyuncs.com/iotlcm/iotlcm:iotlcm-app-web-v1.0.2'
|
||||
image: 'crpi-qflrqrxoohlkkvgc.cn-chengdu.personal.cr.aliyuncs.com/iotlcm/iotlcm:iotlcm-app-web-v1.0.4'
|
||||
container_name: iotlcm-app-web
|
||||
restart: always
|
||||
ports:
|
||||
|
||||
@@ -35,7 +35,7 @@ image: 'crpi-.../iotlcm/iotlcm:iotlcm-admin-svr-v1.0.4'
|
||||
| tag 形式 | 示例 |
|
||||
| --- | --- |
|
||||
| 基础组件:`<组件>-<版本>` | `mysql-8.0`、`redis-7.2`、`nginx-1.30` |
|
||||
| 业务服务:`<服务>-<版本>` | `iotlcm-admin-svr-v1.0.4`、`iotlcm-app-server-v1.0.2` |
|
||||
| 业务服务:`<服务>-<版本>` | `iotlcm-admin-svr-v1.0.4`、`iotlcm-app-server-v1.0.4` |
|
||||
|
||||
改用自有仓库时,全局替换 Registry 前缀即可。
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:11190/healthz
|
||||
|
||||
### 7. 浏览器登录
|
||||
|
||||
访问 `http://<宿主机IP>:8009`:
|
||||
访问 `http://127.0.0.1:8009`(编排默认把业务端口绑定在 `127.0.0.1`;需要从其他机器访问时,用 `--profile with-nginx` 起反向代理,或改绑定地址):
|
||||
|
||||
| 项 | 值 |
|
||||
| --- | --- |
|
||||
|
||||
@@ -25,7 +25,7 @@ docker compose config --images | sort -u
|
||||
```text
|
||||
registry.example.com/iotlcm/iotlcm:iotlcm-admin-svr-v1.0.4
|
||||
registry.example.com/iotlcm/iotlcm:iotlcm-admin-ui-v1.0.4
|
||||
registry.example.com/iotlcm/iotlcm:iotlcm-app-server-v1.0.2
|
||||
registry.example.com/iotlcm/iotlcm:iotlcm-app-server-v1.0.4
|
||||
...
|
||||
registry.example.com/iotlcm/iotlcm:mysql-8.0
|
||||
registry.example.com/iotlcm/iotlcm:redis-7.2
|
||||
|
||||
@@ -71,7 +71,7 @@ crpi-.../iotlcm/iotlcm:mysql-8.0
|
||||
crpi-.../iotlcm/iotlcm:redis-7.2
|
||||
crpi-.../iotlcm/iotlcm:iotlcm-admin-svr-v1.0.4
|
||||
crpi-.../iotlcm/iotlcm:iotlcm-openapi-v1.0.4
|
||||
crpi-.../iotlcm/iotlcm:iotlcm-app-server-v1.0.2
|
||||
crpi-.../iotlcm/iotlcm:iotlcm-app-server-v1.0.4
|
||||
```
|
||||
|
||||
tag 格式统一为 **`<服务名>-<版本>`**。
|
||||
|
||||
Reference in New Issue
Block a user