cert工具使用

certimate

使用 docker-compose.yaml 配置

1
2
3
4
5
6
7
8
9
10
11
12
13
services:
certimate:
image: certimate/certimate:latest
container_name: certimate
restart: unless-stopped

ports:
- "8090:8090"

volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ./data:/app/pb_data

进入页面配置
配置工作流(导入导出)

yaml 文件示例

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
nodes:
- id: "W3JItULBvn8s1k_fByAFa"
type: "start"
name: "开始"
config:
trigger: "scheduled"
triggerCron: "0 0 * * *"
- id: "TqZiCE65a8nndML927uWL"
type: "tryCatch"
name: "尝试执行…"
blocks:
- id: "wP05qpHc2o8senLGK21IG"
type: "tryBlock"
name: ""
blocks:
- id: "6Hz6TQfuK3BJKtfLpPm7v"
type: "bizApply"
name: "申请"
config:
caProvider: "letsencrypt"
challengeType: "dns-01"
contactEmail: "[email protected]"
dnsPropagationTimeout: "600"
dnsPropagationWait: "120"
dnsTTL: "60"
domains: "*.dev.kibana.eu.org;dev.kibana.eu.org"
identifier: "domain"
keyAlgorithm: "RSA2048"
keySource: "auto"
provider: "volcengine-dns"
providerAccessId: "npl5uw87umfarfp"
skipBeforeExpiryDays: 15
validityLifetime: ""
- id: "VZsetNe-cIvguDsXZsOA"
type: "bizDeploy"
name: "部署"
config:
certificateOutputNodeId: "6Hz6TQfuK3BJKtfLpPm7v"
provider: "volcengine-dcdn"
providerAccessId: "npl5uw87umfarfp"
providerConfig:
domain: ""
domainMatchPattern: "certsan"
skipOnLastSucceeded: true
- id: "ugkKjk7kX5hiLlAgiLRff"
type: "bizNotify"
name: "通知"
config:
message: "Your workflow \"{{ $workflow.name }}\" run Succeed"
provider: "larkbot"
providerAccessId: "2abm6u6j8mk0a4x"
skipOnAllPrevSkipped: true
subject: "[Certimate] Workflow Succeed Alert!"
- id: "juTWK1oNn7k2sVpDPxsfg"
type: "catchBlock"
name: "若执行失败…"
blocks:
- id: "xUyJLE6s4cnLnPLhF_5vT"
type: "bizNotify"
name: "通知"
config:
message: "Your workflow \"{{ $workflow.name }}\" run has failed. Please check
the details."
provider: "larkbot"
providerAccessId: "2abm6u6j8mk0a4x"
subject: "[Certimate] Workflow Failure Alert!"
- id: "XFSUxywOn6_KNJMwQ0Grm"
type: "end"
name: "结束"
- id: "J7swInTDA7VkvtcRabCh6"
type: "end"
name: "结束"

dnsmgr

功能类似,界面没那么好,但是支持一个平台管理多个平台的 dns 记录

操作

1
2
3
4
5
6
7
8
9
mkdir -p ./web
mkdir -p ./mysql/conf
mkdir -p ./mysql/logs
mkdir -p ./mysql/data

cat > mysql/conf/my.cnf <<'EOF'
[mysqld]
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
EOF

使用 docker-compose.yaml 配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
services:
dnsmgr-web:
container_name: dnsmgr-web
stdin_open: true
tty: true
ports:
- 8081:80
volumes:
- ./web:/app/www
image: netcccyun/dnsmgr
depends_on:
- dnsmgr-mysql
networks:
- dnsmgr-network

dnsmgr-mysql:
container_name: dnsmgr-mysql
restart: always
ports:
- 3306:3306
volumes:
- ./mysql/conf/my.cnf:/etc/mysql/my.cnf
- ./mysql/logs:/logs
- ./mysql/data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=123456
- TZ=Asia/Shanghai
image: mysql:5.7
networks:
- dnsmgr-network

networks:
dnsmgr-network:
driver: bridge

初始化数据库

1
2
3
docker exec -i dnsmgr-mysql mysql -uroot -p123456 -e "CREATE DATABASE IF NOT EXISTS dnsmgr;"

docker exec -i dnsmgr-mysql mysql -uroot -p123456 -e "SHOW DATABASES LIKE 'dnsmgr';"

然后登录页面配置 数据库域名 dnsmgr-mysql 即可