Compare commits

...

3 Commits

Author SHA1 Message Date
xiaojunnuo 11b7cfe5cb perf: 支持主动修改绑定url地址 2026-04-24 00:11:55 +08:00
xiaojunnuo 71cfcad2a1 fix: 修复列表页面底部滚动条与表格之间有空白间隙的bug 2026-04-24 00:04:42 +08:00
xiaojunnuo ab4373b26e chore: 商业版放开限制,可以切换为企业模式 2026-04-23 23:30:52 +08:00
7 changed files with 39 additions and 29 deletions
+13 -9
View File
@@ -1,6 +1,8 @@
# Docker方式部署
## 一、 一键脚本安装(推荐)
## 一、安装
### 一键脚本安装(推荐)
如果您的服务器未安装 Docker,该脚本会自动为您安装 Docker 和 Docker Compose,并启动 Certd 容器。
@@ -9,13 +11,14 @@ curl -fsSL https://gitee.com/certd/certd/raw/v2/docker/run/install.sh | bash
```
> 支持 Ubuntu、Debian、CentOS、Rocky Linux、AlmaLinux 等主流发行版。
> 如需指定版本,可使用参数:`-v 1.29.0`
> 如需指定数据保存路径,可使用参数:`-p /data/certd`
> docker-compose文件目录:`/opt/certd` ,升级时需要先进入此目录
> 运行时数据默认保存路径:`/data/certd` ,可使用参数指定`-p /data/certd`
## 二、手动安装
### 手动安装
### 1. 环境准备
#### 1. 环境准备
1.1 准备一台云服务器
@@ -32,9 +35,9 @@ https://docs.docker.com/engine/install/
```bash
# 随便创建一个目录
mkdir certd
mkdir /opt/certd
# 进入目录
cd certd
cd /opt/certd
# 下载docker-compose.yaml文件,或者手动下载放到certd目录下
wget https://gitee.com/certd/certd/raw/v2/docker/run/docker-compose.yaml
@@ -67,12 +70,12 @@ https://your_server_ip:7002
记得修改密码
## 二、升级
## 二、升级Certd
::: warning
如果您是第一次升级certd版本,切记切记先备份一下数据
```
# docker-compose.yaml配置
# 查看/opt/certd/docker-compose.yaml配置
- /data/certd:/app/data # 请务必确保 /app/data 这个路径没有改动,固定写死
```
:::
@@ -84,6 +87,7 @@ https://your_server_ip:7002
### 如果使用`latest`版本
```shell
cd /opt/certd
#重新拉取镜像
docker pull registry.cn-shenzhen.aliyuncs.com/handsfree/certd:latest
# 重新启动容器
@@ -6,10 +6,10 @@ import { BaseSettings, SysInstallInfo, SysPrivateSettings, SysPublicSettings, Sy
import { getAllSslProviderDomains, setSslProviderReverseProxies } from '@certd/acme-client';
import { cache, logger, mergeUtils, setGlobalProxy } from '@certd/basic';
import { isPlus } from '@certd/plus-core';
import * as dns from 'node:dns';
import { BaseService, setAdminMode } from '../../../basic/index.js';
import { executorQueue } from '../../basic/service/executor-queue.js';
import { isComm, isPlus } from '@certd/plus-core';
const { merge } = mergeUtils;
let lastSaveEnvVars = {};
@@ -119,11 +119,11 @@ export class SysSettingsService extends BaseService<SysSettingsEntity> {
}
async savePublicSettings(bean: SysPublicSettings) {
if (isComm()) {
if (bean.adminMode === 'enterprise') {
throw new Error("商业版不支持使用企业管理模式")
}
}
// if (isComm()) {
// if (bean.adminMode === 'enterprise') {
// throw new Error("商业版不支持使用企业管理模式")
// }
// }
await this.saveSetting(bean);
//让设置生效
@@ -289,7 +289,7 @@ export const useSettingStore = defineStore({
}
},
openBindUrlModal() {
openBindUrlModal(opts: { closable?: boolean } = { closable: false }) {
const event: any = { ModalRef: null };
mitter.emit("getModal", event);
const Modal = event.ModalRef;
@@ -302,10 +302,12 @@ export const useSettingStore = defineStore({
modalRef.destroy();
}
};
const { closable = false } = opts;
const modalRef: any = Modal.warning({
title: "URL地址未绑定,是否绑定此地址?",
width: 500,
keyboard: false,
closable,
content: () => {
return (
<div class="p-4">
@@ -338,10 +340,10 @@ export const useSettingStore = defineStore({
danger: true,
},
okText: "不,回到原来的地址",
cancelText: "不,回到原来的地址",
onCancel: () => {
window.location.href = bindUrl;
},
// cancelText: "不,回到原来的地址",
// onOk: () => {
// window.location.href = bindUrl;
// },
});
},
async loadProductInfo() {
@@ -73,13 +73,11 @@
margin: 20px;
}
.fs-crud-table {
.ant-table-body {
height: 60vh;
table {
}
}
}
// .fs-crud-table {
// .ant-table-body {
// height:60vh;
// }
// }
body a {
color: #1890ff;
@@ -142,4 +140,5 @@ button.ant-btn.ant-btn-default.isPlus{
color: rgba(233, 233, 233, 0.25);
}
}
}
}
@@ -182,6 +182,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
},
showSelect: false,
createCrudOptions: createCrudOptionsPipeline,
height: "60vh",
crudOptionsOverride: {
actionbar: {
show: false,
@@ -25,6 +25,10 @@
<div class="helper" v-html="t('certd.sys.setting.noticeHelper')"></div>
</a-form-item>
<a-form-item :label="t('certd.sys.setting.bindUrl')">
<a-button class="ml-2" type="primary" @click="settingsStore.openBindUrlModal({ closable: true })">{{ t("certd.sys.setting.bindUrl") }}</a-button>
</a-form-item>
<a-form-item label=" " :colon="false" :wrapper-col="{ span: 8 }">
<a-button :loading="saveLoading" type="primary" html-type="submit">{{ t("certd.saveButton") }}</a-button>
</a-form-item>
@@ -8,7 +8,7 @@
</div>
<pre class="helper pre">{{ t("certd.sys.setting.passkeyEnabledHelper", [bindDomain]) }}</pre>
<div v-if="!bindDomainIsSame" class="text-red-500 text-sm mt-2">
{{ t("certd.sys.setting.passkeyHostnameNotSame") }} <a-button class="ml-2" size="small" type="primary" @click="settingsStore.openBindUrlModal()">{{ t("certd.sys.setting.bindUrl") }}</a-button>
{{ t("certd.sys.setting.passkeyHostnameNotSame") }} <a-button class="ml-2" size="small" type="primary" @click="settingsStore.openBindUrlModal({ closable: true })">{{ t("certd.sys.setting.bindUrl") }}</a-button>
</div>
</a-form-item>
<a-form-item :label="t('certd.sys.setting.enableOauth')" :name="['public', 'oauthEnabled']">