2024-09-26 06:53:00 +00:00
|
|
|
|
version: '3.3' # 兼容旧版docker-compose
|
2023-07-03 02:14:22 +00:00
|
|
|
|
services:
|
2023-05-25 09:14:58 +00:00
|
|
|
|
certd:
|
2024-12-25 02:38:48 +00:00
|
|
|
|
# 镜像 # ↓↓↓↓↓ ---- 镜像版本号,建议改成固定版本号,例如:certd:1.29.0
|
2024-07-23 04:35:24 +00:00
|
|
|
|
image: registry.cn-shenzhen.aliyuncs.com/handsfree/certd:latest
|
2023-05-25 09:14:58 +00:00
|
|
|
|
container_name: certd # 容器名
|
2024-06-15 16:42:17 +00:00
|
|
|
|
restart: unless-stopped # 自动重启
|
2023-06-28 07:16:19 +00:00
|
|
|
|
volumes:
|
2024-09-12 01:26:00 +00:00
|
|
|
|
# ↓↓↓↓↓ -------------------------------------------------------- 数据库以及证书存储路径,默认存在宿主机的/data/certd/目录下,【您需要定时备份此目录,以保障数据容灾】
|
2023-05-25 09:14:58 +00:00
|
|
|
|
- /data/certd:/app/data
|
|
|
|
|
ports: # 端口映射
|
2024-09-12 01:26:00 +00:00
|
|
|
|
# ↓↓↓↓ ---------------------------------------------------------- 如果端口有冲突,可以修改第一个7001为其他不冲突的端口号
|
2023-05-25 09:14:58 +00:00
|
|
|
|
- "7001:7001"
|
2024-11-13 14:42:11 +00:00
|
|
|
|
# ↓↓↓↓ ---------------------------------------------------------- https端口,可以根据实际情况,是否暴露该端口
|
2024-10-26 09:14:55 +00:00
|
|
|
|
- "7002:7002"
|
2024-11-13 15:44:01 +00:00
|
|
|
|
#↓↓↓↓ -------------------------------------------------------------- 如果出现getaddrinfo ENOTFOUND错误,可以尝试设置dns
|
2024-11-29 05:41:02 +00:00
|
|
|
|
# dns:
|
|
|
|
|
# - 223.5.5.5 # 阿里云公共dns
|
|
|
|
|
# - 223.6.6.6
|
2024-11-13 15:44:01 +00:00
|
|
|
|
# # ↓↓↓↓ --------------------------------------------------------- 如果你服务器在腾讯云,可以用这个替换上面阿里云的公共dns
|
|
|
|
|
# - 119.29.29.29 # 腾讯云公共dns
|
2024-11-11 05:50:09 +00:00
|
|
|
|
# - 182.254.116.116
|
2024-11-13 15:44:01 +00:00
|
|
|
|
# # ↓↓↓↓ --------------------------------------------------------- 如果你服务器部署在国外,可以用这个替换上面阿里云的公共dns
|
|
|
|
|
# - 8.8.8.8 # 谷歌公共dns
|
2024-11-11 05:50:09 +00:00
|
|
|
|
# - 8.8.4.4
|
2024-09-12 01:26:00 +00:00
|
|
|
|
# extra_hosts:
|
2024-11-13 14:42:11 +00:00
|
|
|
|
# # ↓↓↓↓ -------------------------------------------------------- 这里可以配置自定义hosts,外网域名可以指向本地局域网ip地址
|
2024-12-25 03:42:42 +00:00
|
|
|
|
# - "localdomain.com:192.168.1.3"
|
2024-12-26 08:14:08 +00:00
|
|
|
|
labels:
|
|
|
|
|
com.centurylinklabs.watchtower.enable: "true"
|
|
|
|
|
# ↓↓↓↓ -------------------------------------------------------------- 启用ipv6网络,还需要把下面networks的注释放开
|
|
|
|
|
# networks:
|
|
|
|
|
# - ip6net
|
2024-10-31 08:19:35 +00:00
|
|
|
|
environment:
|
2024-11-13 14:42:11 +00:00
|
|
|
|
# 设置环境变量即可自定义certd配置
|
|
|
|
|
# 配置项见: packages/ui/certd-server/src/config/config.default.ts
|
|
|
|
|
# 配置规则: certd_ + 配置项, 点号用_代替
|
|
|
|
|
# #↓↓↓↓ ----------------------------- 如果忘记管理员密码,可以设置为true,重启之后,管理员密码将改成123456,然后请及时修改回false
|
2024-08-23 09:16:52 +00:00
|
|
|
|
- certd_system_resetAdminPasswd=false
|
2024-12-26 08:14:08 +00:00
|
|
|
|
|
2024-12-24 09:09:06 +00:00
|
|
|
|
# 默认使用sqlite文件数据库,如果需要使用其他数据库,请设置以下环境变量
|
2024-12-25 15:20:07 +00:00
|
|
|
|
# 注意: 选定使用一种数据库之后,不支持更换数据库。
|
|
|
|
|
# 数据库迁移方法:1、使用新数据库重新部署一套,然后将旧数据同步过去,注意flyway_history表的数据不要同步
|
2024-12-09 09:47:01 +00:00
|
|
|
|
# #↓↓↓↓ ----------------------------- 使用postgresql数据库,需要提前创建数据库
|
2024-11-13 14:42:11 +00:00
|
|
|
|
# - certd_flyway_scriptDir=./db/migration-pg # 升级脚本目录
|
|
|
|
|
# - certd_typeorm_dataSource_default_type=postgres # 数据库类型
|
|
|
|
|
# - certd_typeorm_dataSource_default_host=localhost # 数据库地址
|
|
|
|
|
# - certd_typeorm_dataSource_default_port=5433 # 数据库端口
|
|
|
|
|
# - certd_typeorm_dataSource_default_username=postgres # 用户名
|
|
|
|
|
# - certd_typeorm_dataSource_default_password=yourpasswd # 密码
|
|
|
|
|
# - certd_typeorm_dataSource_default_database=certd # 数据库名
|
2024-10-10 17:22:38 +00:00
|
|
|
|
|
2024-12-09 09:47:01 +00:00
|
|
|
|
# #↓↓↓↓ ----------------------------- 使用mysql数据库,需要提前创建数据库 charset=utf8mb4, collation=utf8mb4_bin
|
|
|
|
|
# - certd_flyway_scriptDir=./db/migration-mysql # 升级脚本目录
|
|
|
|
|
# - certd_typeorm_dataSource_default_type=mysql # 数据库类型, 或者 mariadb
|
|
|
|
|
# - certd_typeorm_dataSource_default_host=localhost # 数据库地址
|
|
|
|
|
# - certd_typeorm_dataSource_default_port=3306 # 数据库端口
|
|
|
|
|
# - certd_typeorm_dataSource_default_username=root # 用户名
|
|
|
|
|
# - certd_typeorm_dataSource_default_password=yourpasswd # 密码
|
|
|
|
|
# - certd_typeorm_dataSource_default_database=certd # 数据库名
|
|
|
|
|
|
2024-12-26 08:14:08 +00:00
|
|
|
|
# ↓↓↓↓ --------------------------------------------------------- 自动升级,上面certd的版本号要保持为latest
|
|
|
|
|
# certd-updater: # 添加 Watchtower 服务
|
|
|
|
|
# image: containrrr/watchtower:latest
|
|
|
|
|
# container_name: certd-updater
|
|
|
|
|
# restart: unless-stopped
|
|
|
|
|
# volumes:
|
|
|
|
|
# - /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
|
# # 配置 自动更新
|
|
|
|
|
# environment:
|
|
|
|
|
# - WATCHTOWER_CLEANUP=true # 自动清理旧版本容器
|
|
|
|
|
# - WATCHTOWER_INCLUDE_STOPPED=false # 不更新已停止的容器
|
|
|
|
|
# - WATCHTOWER_LABEL_ENABLE=true # 根据容器标签进行更新
|
|
|
|
|
# - WATCHTOWER_POLL_INTERVAL=600 # 每 10 分钟检查一次更新
|
2024-12-09 09:47:01 +00:00
|
|
|
|
|
|
|
|
|
|
2024-12-26 08:14:08 +00:00
|
|
|
|
# ↓↓↓↓ -------------------------------------------------------------- 启用ipv6网络,还需要把上面networks的注释放开
|
2024-11-13 14:42:11 +00:00
|
|
|
|
#networks:
|
|
|
|
|
# ip6net:
|
|
|
|
|
# enable_ipv6: true
|
|
|
|
|
# ipam:
|
|
|
|
|
# config:
|
|
|
|
|
# - subnet: 2001:db8::/64
|