perf: 更新certd本身的证书文档说明

pull/229/head
xiaojunnuo 2024-10-26 17:14:55 +08:00
parent d5a17f9e6a
commit 0c50ede129
13 changed files with 44 additions and 12 deletions

View File

@ -11,6 +11,8 @@ services:
ports: # 端口映射
# ↓↓↓↓ ---------------------------------------------------------- 如果端口有冲突可以修改第一个7001为其他不冲突的端口号
- "7001:7001"
# ↓↓↓↓ ---------------------------------------------------------- https端口可以根据实际情况是否暴露相关服务端口
- "7002:7002"
dns:
# ↓↓↓↓ ---------------------------------------------------------- 如果出现getaddrinfo ENOTFOUND等错误可以尝试修改或注释dns配置
- 223.5.5.5

View File

@ -97,6 +97,7 @@ export default defineConfig({
{ text: "阿里云相关", link: "/guide/use/aliyun/" },
{ text: "忘记密码", link: "/guide/use/forgotpasswd/" },
{ text: "数据备份", link: "/guide/use/backup/" },
{ text: "Certd本身的证书更新", link: "/guide/use/https/index.md" },
{ text: "如何贡献代码", link: "/guide/development/index.md" },
]
},

View File

@ -24,7 +24,7 @@ https://1panel.cn/docs/installation/online_installation/
3. 访问测试
http://ip:7001
https://ip:7002
## 三、升级

View File

@ -31,7 +31,8 @@
## 二、访问应用
http://ip:7001
http://ip:7001
https://ip:7002
## 三、如何升级

View File

@ -45,9 +45,10 @@ docker compose up -d
### 3. 访问测试
http://your_server_ip:7001
默认账号密码admin/123456
记得修改密码
http://your_server_ip:7001
https://your_server_ip:7002
默认账号密码admin/123456
记得修改密码
## 二、升级

View File

@ -17,7 +17,8 @@ cd certd
### 访问测试
http://your_server_ip:7001
http://your_server_ip:7001
https://your_server_ip:7002
默认账号密码admin/123456
记得修改密码

View File

@ -25,7 +25,8 @@ https://certd.handsfree.work/
### 2. 访问测试
http://your_server_ip:7001
http://your_server_ip:7001
https://your_server_ip:7002
默认账号密码admin/123456
记得修改密码

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -0,0 +1,28 @@
# Certd本身的https证书配置
## 一、启用https
`Certd`默认启用https监听7002端口
如果你想关闭https或者修改端口可以在环境变量中配置
```shell
CERTD_HTTPS_ENABLE=true
CERTD_HTTPS_port=7002
```
## 二、自动更新Certd的https证书
### 1、创建证书流水线
参考Certd顶部的创建证书流水线教程
### 2、配置复制到本机任务
![](./images/1.png)
![](./images/2.png)
### 3、重启Certd
![img.png](./images/3.png)
:::warning
重启Certd插件并不具备重启自己的能力而是`杀死自己`,然后靠`Docker`来重启自己
:::

View File

@ -13,10 +13,7 @@ export type HttpsServerOptions = {
};
export async function startHttpsServer(opts: HttpsServerOptions) {
// const httpsServer = https.createServer({
// key: fs.readFileSync(path.join(__dirname, '../ssl/2_certd.cn.key')),
// cert
logger.info('=========================================');
if (!opts.key || !opts.cert) {
logger.error('证书路径未配置无法启动https服务请先配置koa.https.key和koa.https.cert');
return;

View File

@ -30,7 +30,7 @@ export class RestartCertdPlugin extends AbstractTaskPlugin {
}
this.logger.info(`Certd 将在 ${this.delay} 秒后关闭`);
setTimeout(() => {
this.logger.info('重启 Certd');
this.logger.info('关闭 Certd');
process.exit(1);
}, this.delay * 1000);
}