Merge remote-tracking branch 'origin/v2' into v2

pull/148/head
xiaojunnuo 2024-07-26 09:47:38 +08:00
commit 4404f99642
25 changed files with 108 additions and 53 deletions

View File

@ -54,4 +54,5 @@ jobs:
push: true push: true
context: ./packages/ui/ context: ./packages/ui/
tags: | tags: |
registry.cn-shenzhen.aliyuncs.com/handsfree/certd:latest
registry.cn-shenzhen.aliyuncs.com/handsfree/certd:${{steps.get_certd_version.outputs.result}} registry.cn-shenzhen.aliyuncs.com/handsfree/certd:${{steps.get_certd_version.outputs.result}}

View File

@ -2,8 +2,6 @@ name: sync-to-gitee
on: on:
push: push:
branches: ['v2'] branches: ['v2']
pull_request:
branches: ['v2']
# schedule: # schedule:
# - # 国际时间 19:17 执行北京时间3:17 ↙↙↙ 改成你想要每天自动执行的时间 # - # 国际时间 19:17 执行北京时间3:17 ↙↙↙ 改成你想要每天自动执行的时间
# - cron: '17 19 * * *' # - cron: '17 19 * * *'

View File

@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.22.3](https://github.com/certd/certd/compare/v1.22.2...v1.22.3) (2024-07-25)
### Bug Fixes
* lege 无执行权限问题 ([338eb3b](https://github.com/certd/certd/commit/338eb3bdfeb461e9b3bc7eee97b97a59f5642ffe))
## [1.22.2](https://github.com/certd/certd/compare/v1.22.1...v1.22.2) (2024-07-23) ## [1.22.2](https://github.com/certd/certd/compare/v1.22.1...v1.22.2) (2024-07-23)
### Bug Fixes ### Bug Fixes

View File

@ -8,17 +8,14 @@ CertD 是一个免费全自动申请和自动部署更新SSL证书的工具。
## 一、特性 ## 一、特性
本项目不仅支持证书申请过程自动化,还可以自动化部署更新证书,让你的证书永不过期。 本项目不仅支持证书申请过程自动化,还可以自动化部署更新证书,让你的证书永不过期。
* 全自动申请证书支持阿里云、腾讯云、华为云、Cloudflare注册的域名 * 全自动申请证书支持阿里云、腾讯云、华为云、Cloudflare等各种途径注册的域名
* 全自动部署更新证书(目前支持服务器上传部署、部署到阿里云、腾讯云等) * 全自动部署更新证书(目前支持部署到主机、部署到阿里云、腾讯云等)
* 支持通配符域名 * 支持通配符域名/泛域名,支持多个域名打到一个证书上
* 支持多个域名打到一个证书上
* 邮件通知 * 邮件通知
* 证书自动更新 * 私有化部署,保障安全
* 私有化部署,安全
* 免费、免费、免费([阿里云单个通配符域名证书最便宜也要1800/年](https://yundun.console.aliyun.com/?p=cas#/certExtend/buy/cn-hangzhou) * 免费、免费、免费([阿里云单个通配符域名证书最便宜也要1800/年](https://yundun.console.aliyun.com/?p=cas#/certExtend/buy/cn-hangzhou)
## 二、在线体验 ## 二、在线体验
官方Demo地址自助注册后体验 官方Demo地址自助注册后体验
@ -41,7 +38,9 @@ https://certd.handsfree.work/
-------> [点我查看详细使用步骤演示](./step.md) <-------- -------> [点我查看详细使用步骤演示](./step.md) <--------
↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
## 四、本地docker部署 ## 四、私有化部署
由于证书、授权信息等属于高度敏感数据,请务必私有化部署,保障数据安全
### 1. 安装docker、docker-compose ### 1. 安装docker、docker-compose
@ -50,14 +49,16 @@ https://certd.handsfree.work/
* 【腾讯云】云服务器2核2G新老用户同享99元/年,续费同价!【 [立即购买](https://cloud.tencent.com/act/cps/redirect?redirect=6094&cps_key=b3ef73330335d7a6efa4a4bbeeb6b2c9&from=console)】 * 【腾讯云】云服务器2核2G新老用户同享99元/年,续费同价!【 [立即购买](https://cloud.tencent.com/act/cps/redirect?redirect=6094&cps_key=b3ef73330335d7a6efa4a4bbeeb6b2c9&from=console)】
1.2 安装docker 1.2 安装docker
https://docs.docker.com/engine/install/
选择对应的操作系统,按照官方文档执行命令即可
https://docs.docker.com/engine/install/
选择对应的操作系统,按照官方文档执行命令即可
### 2. 运行certd ### 2. 运行certd
[docker-compose.yaml下载](https://gitee.com/certd/certd/raw/v2/docker/run/docker-compose.yaml) [docker-compose.yaml 下载](https://gitee.com/certd/certd/raw/v2/docker/run/docker-compose.yaml)
当前版本号: ![](https://img.shields.io/npm/v/%40certd%2Fpipeline)
```bash ```bash
# 随便创建一个目录 # 随便创建一个目录
@ -77,10 +78,18 @@ vi docker-compose.yaml # 【可选】
docker compose up -d docker compose up -d
``` ```
当前版本号: ![](https://img.shields.io/npm/v/%40certd%2Fpipeline) > 如果提示 没有compose命令,请安装docker-compose
> https://docs.docker.com/compose/install/linux/
#### 镜像说明:
* certd镜像地址:
* `registry.cn-shenzhen.aliyuncs.com/handsfree/certd:latest`
* 镜像构建通过`Actions`自动执行,过程公开透明,请放心使用
* [点我查看镜像构建日志](https://github.com/certd/certd/actions/workflows/build-image.yml)
![](./doc/images/action-build.jpg)
如果提示 没有compose命令,请安装docker-compose
https://docs.docker.com/compose/install/linux/
### 3. 访问 ### 3. 访问
@ -89,14 +98,22 @@ http://your_server_ip:7001
记得修改密码 记得修改密码
### 4. 升级 ## 五、 升级
如果使用固定版本号
1. 修改`docker-compose.yaml`中的镜像版本号
2. 运行 `docker compose up -d` 即可
* 修改`docker-compose.yaml`中的镜像版本号 如果使用`latest`版本
* 重新运行 `docker compose up -d` 即可 1. 重新拉取镜像 `docker pull registry.cn-shenzhen.aliyuncs.com/handsfree/certd:latest`
* 数据存在`/data/certd`目录下,不用担心数据丢失 2. 重新启动容器 `docker compose restart`
> 数据默认存在`/data/certd`目录下,不用担心数据丢失
## 五、一些说明 更新日志: [CHANGELOG](./CHANGELOG.md)
## 六、一些说明
* 本项目ssl证书提供商为letencrypt * 本项目ssl证书提供商为letencrypt
* 申请过程遵循acme协议 * 申请过程遵循acme协议
* 需要验证域名所有权一般有两种方式目前本项目仅支持dns-01 * 需要验证域名所有权一般有两种方式目前本项目仅支持dns-01
@ -108,14 +125,15 @@ http://your_server_ip:7001
* 免费证书过期时间90天以后可能还会缩短所以自动化部署必不可少 * 免费证书过期时间90天以后可能还会缩短所以自动化部署必不可少
* 设置每天自动运行当证书过期前20天会自动重新申请证书并部署 * 设置每天自动运行当证书过期前20天会自动重新申请证书并部署
## 六、不同平台的设置说明
## 七、不同平台的设置说明
* [Cloudflare](./doc/cf/cf.md) * [Cloudflare](./doc/cf/cf.md)
* [腾讯云](./doc/tencent/tencent.md) * [腾讯云](./doc/tencent/tencent.md)
* [windows主机](./doc/host/host.md) * [windows主机](./doc/host/host.md)
## 、问题处理 ## 、问题处理
### 7.1 忘记管理员密码 ### 7.1 忘记管理员密码
解决方法如下: 解决方法如下:
1. 修改docker-compose.yaml文件将环境变量`certd_system_resetAdminPassword`改为`true` 1. 修改docker-compose.yaml文件将环境变量`certd_system_resetAdminPassword`改为`true`
@ -138,7 +156,7 @@ docker compose up -d
``` ```
5. 使用`admin/123456`登录系统,请及时修改管理员密码 5. 使用`admin/123456`登录系统,请及时修改管理员密码
## 、联系作者 ## 、联系作者
如有疑问欢迎加入群聊请备注certd 如有疑问欢迎加入群聊请备注certd
* QQ群141236433 * QQ群141236433
* 微信群: * 微信群:
@ -150,7 +168,7 @@ docker compose up -d
<img height="230" src="./doc/images/me.png"> <img height="230" src="./doc/images/me.png">
</p> </p>
## 、捐赠 ## 、捐赠
媳妇儿说:“一天到晚搞开源,也不管管老婆孩子!😡😡😡” 媳妇儿说:“一天到晚搞开源,也不管管老婆孩子!😡😡😡”
拜托各位捐赠支持一下,让媳妇儿开心开心,我也能有更多时间进行开源项目,感谢🙏🙏🙏 拜托各位捐赠支持一下,让媳妇儿开心开心,我也能有更多时间进行开源项目,感谢🙏🙏🙏
<p align="center"> <p align="center">
@ -158,16 +176,20 @@ docker compose up -d
</p> </p>
## 十、贡献代码 ## 十、贡献代码
[贡献插件教程](./plugin.md) [贡献插件教程](./plugin.md)
## 十、我的其他项目求Star ## 十、我的其他项目求Star
* [袖手GPT](https://ai.handsfree.work/) ChatGPT国内可用无需FQ每日免费额度 * [袖手GPT](https://ai.handsfree.work/) ChatGPT国内可用无需FQ每日免费额度
* [fast-crud](https://gitee.com/fast-crud/fast-crud/) 基于vue3的crud快速开发框架 * [fast-crud](https://gitee.com/fast-crud/fast-crud/) 基于vue3的crud快速开发框架
* [dev-sidecar](https://github.com/docmirror/dev-sidecar/) 直连访问github工具无需FQ解决github无法访问的问题 * [dev-sidecar](https://github.com/docmirror/dev-sidecar/) 直连访问github工具无需FQ解决github无法访问的问题
## 十二、版本更新日志
https://github.com/certd/certd/blob/v2/CHANGELOG.md ## 十三、更新日志
更新日志:[CHANGELOG](./CHANGELOG.md)

View File

@ -1 +1 @@
4 7

BIN
doc/images/action-build.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

View File

@ -9,5 +9,5 @@
} }
}, },
"npmClient": "pnpm", "npmClient": "pnpm",
"version": "1.22.2" "version": "1.22.3"
} }

View File

@ -12,7 +12,7 @@
"scripts": { "scripts": {
"start": "lerna bootstrap --hoist", "start": "lerna bootstrap --hoist",
"i-all": "lerna link && lerna exec npm install ", "i-all": "lerna link && lerna exec npm install ",
"publish": "npm run prepublishOnly1 && lerna publish --conventional-commits --create-release github && npm run afterpublishOnly && npm run deploy1", "publish": "npm run prepublishOnly1 && lerna publish --conventional-commits --create-release github && npm run afterpublishOnly",
"afterpublishOnly": "", "afterpublishOnly": "",
"prepublishOnly1": "npm run check && npm run before-build && lerna run build ", "prepublishOnly1": "npm run check && npm run before-build && lerna run build ",
"before-build": "cd ./packages/core/acme-client && time /t >build.md && git add ./build.md && git commit -m \"build: prepare to build\"", "before-build": "cd ./packages/core/acme-client && time /t >build.md && git add ./build.md && git commit -m \"build: prepare to build\"",

View File

@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.22.3](https://github.com/publishlab/node-acme-client/compare/v1.22.2...v1.22.3) (2024-07-25)
**Note:** Version bump only for package @certd/acme-client
## [1.22.2](https://github.com/publishlab/node-acme-client/compare/v1.22.1...v1.22.2) (2024-07-23) ## [1.22.2](https://github.com/publishlab/node-acme-client/compare/v1.22.1...v1.22.2) (2024-07-23)
**Note:** Version bump only for package @certd/acme-client **Note:** Version bump only for package @certd/acme-client

View File

@ -1 +1 @@
02:24 22:32

View File

@ -3,7 +3,7 @@
"description": "Simple and unopinionated ACME client", "description": "Simple and unopinionated ACME client",
"private": false, "private": false,
"author": "nmorsman", "author": "nmorsman",
"version": "1.22.2", "version": "1.22.3",
"main": "src/index.js", "main": "src/index.js",
"types": "types/index.d.ts", "types": "types/index.d.ts",
"license": "MIT", "license": "MIT",

View File

@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.22.3](https://github.com/certd/certd/compare/v1.22.2...v1.22.3) (2024-07-25)
**Note:** Version bump only for package @certd/pipeline
## [1.22.2](https://github.com/certd/certd/compare/v1.22.1...v1.22.2) (2024-07-23) ## [1.22.2](https://github.com/certd/certd/compare/v1.22.1...v1.22.2) (2024-07-23)
**Note:** Version bump only for package @certd/pipeline **Note:** Version bump only for package @certd/pipeline

View File

@ -1,7 +1,7 @@
{ {
"name": "@certd/pipeline", "name": "@certd/pipeline",
"private": false, "private": false,
"version": "1.22.2", "version": "1.22.3",
"type": "module", "type": "module",
"main": "./dist/index.js", "main": "./dist/index.js",
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",

View File

@ -50,7 +50,7 @@ export function createAxiosService({ logger }: { logger: Logger }) {
// case 505: error.message = 'HTTP版本不受支持'; break // case 505: error.message = 'HTTP版本不受支持'; break
// default: break // default: break
// } // }
logger.error(`请求出错url:${error?.response?.config.url},method:${error.response.config.method},status:${error?.response?.status}`); logger.error(`请求出错url:${error?.response?.config.url},method:${error?.response?.config?.method},status:${error?.response?.status}`);
logger.info("返回数据:", JSON.stringify(error?.response?.data)); logger.info("返回数据:", JSON.stringify(error?.response?.data));
delete error.config; delete error.config;
delete error.response; delete error.response;

View File

@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.22.3](https://github.com/certd/certd/compare/v1.22.2...v1.22.3) (2024-07-25)
**Note:** Version bump only for package @certd/lib-k8s
## [1.22.2](https://github.com/certd/certd/compare/v1.22.1...v1.22.2) (2024-07-23) ## [1.22.2](https://github.com/certd/certd/compare/v1.22.1...v1.22.2) (2024-07-23)
**Note:** Version bump only for package @certd/lib-k8s **Note:** Version bump only for package @certd/lib-k8s

View File

@ -1,7 +1,7 @@
{ {
"name": "@certd/lib-k8s", "name": "@certd/lib-k8s",
"private": false, "private": false,
"version": "1.22.2", "version": "1.22.3",
"type": "module", "type": "module",
"main": "./dist/index.js", "main": "./dist/index.js",
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",
@ -17,7 +17,7 @@
"shelljs": "^0.8.5" "shelljs": "^0.8.5"
}, },
"devDependencies": { "devDependencies": {
"@certd/pipeline": "^1.22.2", "@certd/pipeline": "^1.22.3",
"@rollup/plugin-commonjs": "^23.0.4", "@rollup/plugin-commonjs": "^23.0.4",
"@rollup/plugin-json": "^6.0.0", "@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1", "@rollup/plugin-node-resolve": "^15.0.1",

View File

@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.22.3](https://github.com/certd/certd/compare/v1.22.2...v1.22.3) (2024-07-25)
**Note:** Version bump only for package @certd/midway-flyway-js
## [1.22.2](https://github.com/certd/certd/compare/v1.22.1...v1.22.2) (2024-07-23) ## [1.22.2](https://github.com/certd/certd/compare/v1.22.1...v1.22.2) (2024-07-23)
**Note:** Version bump only for package @certd/midway-flyway-js **Note:** Version bump only for package @certd/midway-flyway-js

View File

@ -1,6 +1,6 @@
{ {
"name": "@certd/midway-flyway-js", "name": "@certd/midway-flyway-js",
"version": "1.22.2", "version": "1.22.3",
"description": "midway with flyway, sql upgrade way ", "description": "midway with flyway, sql upgrade way ",
"private": false, "private": false,
"type": "module", "type": "module",

View File

@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.22.3](https://github.com/certd/certd/compare/v1.22.2...v1.22.3) (2024-07-25)
**Note:** Version bump only for package @certd/plugin-cert
## [1.22.2](https://github.com/certd/certd/compare/v1.22.1...v1.22.2) (2024-07-23) ## [1.22.2](https://github.com/certd/certd/compare/v1.22.1...v1.22.2) (2024-07-23)
**Note:** Version bump only for package @certd/plugin-cert **Note:** Version bump only for package @certd/plugin-cert

View File

@ -1,7 +1,7 @@
{ {
"name": "@certd/plugin-cert", "name": "@certd/plugin-cert",
"private": false, "private": false,
"version": "1.22.2", "version": "1.22.3",
"type": "module", "type": "module",
"main": "./dist/index.js", "main": "./dist/index.js",
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",
@ -13,8 +13,8 @@
"preview": "vite preview" "preview": "vite preview"
}, },
"dependencies": { "dependencies": {
"@certd/acme-client": "^1.22.2", "@certd/acme-client": "^1.22.3",
"@certd/pipeline": "^1.22.2", "@certd/pipeline": "^1.22.3",
"jszip": "^3.10.1", "jszip": "^3.10.1",
"node-forge": "^0.10.0", "node-forge": "^0.10.0",
"psl": "^1.9.0" "psl": "^1.9.0"

View File

@ -1,4 +1,4 @@
FROM node:18-alpine as builder FROM node:18-alpine AS builder
EXPOSE 7001 EXPOSE 7001
WORKDIR /workspace/ WORKDIR /workspace/
COPY . /workspace/ COPY . /workspace/
@ -9,10 +9,10 @@ RUN cd /workspace/certd-server && pnpm install && npm run build-on-docker
RUN cp /workspace/certd-client/dist/* /workspace/certd-server/public/ -rf RUN cp /workspace/certd-client/dist/* /workspace/certd-server/public/ -rf
FROM node:18-alpine FROM node:18-alpine
WORKDIR /app/ WORKDIR /app/
COPY --from=builder /workspace/certd-server/ /app/ COPY --from=builder /workspace/certd-server/ /app/
RUN chmod +x /app/tools/linux/*
ENV TZ=Asia/Shanghai ENV TZ=Asia/Shanghai
ENV NODE_ENV=production ENV NODE_ENV=production
ENV MIDWAY_SERVER_ENV=production ENV MIDWAY_SERVER_ENV=production

View File

@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.22.3](https://github.com/certd/certd/compare/v1.22.2...v1.22.3) (2024-07-25)
**Note:** Version bump only for package @certd/ui-client
## [1.22.2](https://github.com/certd/certd/compare/v1.22.1...v1.22.2) (2024-07-23) ## [1.22.2](https://github.com/certd/certd/compare/v1.22.1...v1.22.2) (2024-07-23)
### Bug Fixes ### Bug Fixes

View File

@ -1,6 +1,6 @@
{ {
"name": "@certd/ui-client", "name": "@certd/ui-client",
"version": "1.22.2", "version": "1.22.3",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "vite --open", "dev": "vite --open",
@ -59,7 +59,7 @@
"vuedraggable": "^2.24.3" "vuedraggable": "^2.24.3"
}, },
"devDependencies": { "devDependencies": {
"@certd/pipeline": "^1.22.2", "@certd/pipeline": "^1.22.3",
"@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-node-resolve": "^15.2.3",
"@types/chai": "^4.3.12", "@types/chai": "^4.3.12",

View File

@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.22.3](https://github.com/certd/certd/compare/v1.22.2...v1.22.3) (2024-07-25)
**Note:** Version bump only for package @certd/ui-server
## [1.22.2](https://github.com/certd/certd/compare/v1.22.1...v1.22.2) (2024-07-23) ## [1.22.2](https://github.com/certd/certd/compare/v1.22.1...v1.22.2) (2024-07-23)
### Bug Fixes ### Bug Fixes

View File

@ -1,6 +1,6 @@
{ {
"name": "@certd/ui-server", "name": "@certd/ui-server",
"version": "1.22.2", "version": "1.22.3",
"description": "fast-server base midway", "description": "fast-server base midway",
"private": true, "private": true,
"type": "module", "type": "module",
@ -21,12 +21,12 @@
"@alicloud/cs20151215": "^3.0.3", "@alicloud/cs20151215": "^3.0.3",
"@alicloud/openapi-client": "^0.4.0", "@alicloud/openapi-client": "^0.4.0",
"@alicloud/pop-core": "^1.7.10", "@alicloud/pop-core": "^1.7.10",
"@certd/acme-client": "^1.22.2", "@certd/acme-client": "^1.22.3",
"@certd/lib-huawei": "^1.22.1", "@certd/lib-huawei": "^1.22.1",
"@certd/lib-k8s": "^1.22.2", "@certd/lib-k8s": "^1.22.3",
"@certd/midway-flyway-js": "^1.22.2", "@certd/midway-flyway-js": "^1.22.3",
"@certd/pipeline": "^1.22.2", "@certd/pipeline": "^1.22.3",
"@certd/plugin-cert": "^1.22.2", "@certd/plugin-cert": "^1.22.3",
"@koa/cors": "^3.4.3", "@koa/cors": "^3.4.3",
"@midwayjs/bootstrap": "^3.16.2", "@midwayjs/bootstrap": "^3.16.2",
"@midwayjs/cache": "^3.14.0", "@midwayjs/cache": "^3.14.0",