From 3e9ba1a30a58f1edd9ba1eab55fad385f7c74f39 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Thu, 26 Dec 2024 09:02:04 +0800 Subject: [PATCH] docs: --- README.md | 35 ++++++++----------- .../monitor/service/site-info-service.ts | 4 +-- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 0abdf877..5832a4b3 100644 --- a/README.md +++ b/README.md @@ -88,11 +88,13 @@ https://certd.handfree.work/ ## 五、 升级 -如果使用固定版本号 + +### docker-compose方式部署 +#### 1. 如果使用固定版本号 1. 修改`docker-compose.yaml`中的镜像版本号 2. 运行`docker compose up -d` 即可 -如果需要使用最新版本 +#### 2. 如果需要使用最新版本 ```shell #重新拉取镜像 docker pull registry.cn-shenzhen.aliyuncs.com/handsfree/certd:latest @@ -100,7 +102,9 @@ docker pull registry.cn-shenzhen.aliyuncs.com/handsfree/certd:latest docker compose down docker compose up -d ``` -关于自动升级(仅限尝鲜建议非生产使用) +> 数据默认存在`/data/certd`目录下,不用担心数据丢失 + +### 自动升级(仅限尝鲜建议非生产使用) ```yaml version: '3.3' services: @@ -113,16 +117,8 @@ services: ports: - "7001:7001" - "7002:7002" - # 如果需要修改系统配置,可以通过环境变量传递;初次运行请保持默认配置 environment: - certd_system_resetAdminPasswd=false - # 如果需要切换数据库类型,可以在此处设置为mysql或postgres - # - certd_typeorm_dataSource_default_type=mysql - # - certd_typeorm_dataSource_default_host=localhost - # - certd_typeorm_dataSource_default_port=3306 - # - certd_typeorm_dataSource_default_username=root - # - certd_typeorm_dataSource_default_password=123456 - # - certd_typeorm_dataSource_default_database=certd labels: com.centurylinklabs.watchtower.enable: "true" @@ -139,19 +135,16 @@ services: - WATCHTOWER_LABEL_ENABLE=true # 根据容器标签进行更新 - WATCHTOWER_POLL_INTERVAL=300 # 每 5 分钟检查一次更新 -# 如果需要支持 IPv6,请取消以下注释 -# networks: -# ip6net: -# enable_ipv6: true -# ipam: -# config: -# - subnet: 2001:db8::/64 - ``` -> 数据默认存在`/data/certd`目录下,不用担心数据丢失 + +### 其他部署方式升级方法 +请参考 https://certd.docmirror.cn/guide/install/upgrade.html -更新日志: [CHANGELOG](./CHANGELOG.md) + +### 更新日志: + +[CHANGELOG](./CHANGELOG.md) ## 六、一些说明 diff --git a/packages/ui/certd-server/src/modules/monitor/service/site-info-service.ts b/packages/ui/certd-server/src/modules/monitor/service/site-info-service.ts index 7ac256a3..a180de4f 100644 --- a/packages/ui/certd-server/src/modules/monitor/service/site-info-service.ts +++ b/packages/ui/certd-server/src/modules/monitor/service/site-info-service.ts @@ -1,5 +1,5 @@ import { Inject, Provide } from '@midwayjs/core'; -import { BaseService, NeedSuiteException, NeedVIPException, SysSettingsService, SysSuiteSetting } from '@certd/lib-server'; +import { BaseService, NeedSuiteException, NeedVIPException, SysSettingsService } from '@certd/lib-server'; import { InjectEntityModel } from '@midwayjs/typeorm'; import { Repository } from 'typeorm'; import { SiteInfoEntity } from '../entity/site-info.js'; @@ -42,7 +42,7 @@ export class SiteInfoService extends BaseService { } } if (isComm()) { - const suiteSetting = await this.sysSettingsService.getSetting(SysSuiteSetting); + const suiteSetting = await this.userSuiteService.getSuiteSetting(); if (suiteSetting.enabled) { const userSuite = await this.userSuiteService.getMySuiteDetail(data.userId); if (userSuite.monitorCount.max != -1 && userSuite.monitorCount.max <= userSuite.monitorCount.used) {