certd/docker/run/docker-compose.yaml

27 lines
1.6 KiB
YAML
Raw Normal View History

2023-07-03 02:14:22 +00:00
version: '3.3'
services:
2023-05-25 09:14:58 +00:00
certd:
2024-06-15 16:42:17 +00:00
# 镜像 # ↓↓↓↓↓ --- 1、 修改镜像版本号或者干脆写成latest 如果设置了环境变量 export CERTD_VERSION=latest这里可以不修改
2023-07-04 06:19:55 +00:00
image: registry.cn-shenzhen.aliyuncs.com/handsfree/certd:${CERTD_VERSION}
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-06-15 16:42:17 +00:00
# ↓↓↓↓↓ ------------------------------------------------------- 2、 修改数据库以及证书存储路径【可选】
2023-05-25 09:14:58 +00:00
- /data/certd:/app/data
ports: # 端口映射
2024-06-15 16:42:17 +00:00
# ↓↓↓↓ 如果端口有冲突可以修改第一个7001为其他不冲突的端口号
2023-05-25 09:14:58 +00:00
- "7001:7001"
2023-07-03 02:14:22 +00:00
environment: # 环境变量
2023-05-25 09:14:58 +00:00
- TZ=Asia/Shanghai
2023-06-28 01:44:35 +00:00
- certd_auth_jwt_secret=changeme
2024-06-15 16:42:17 +00:00
# ↑↑↑↑↑ ---------------------------------- 3、 修改成你的自定义密钥【必须,安全需要】
- certd_system_resetAdminPassword=false
# ↑↑↑↑↑ 如果忘记管理员密码可以设置为true重启之后管理员密码将改成123456然后请及时修改回false
2023-07-03 02:14:22 +00:00
# 设置环境变量即可自定义certd配置
# 服务端配置项见: packages/ui/certd-server/src/config/config.default.ts
# 服务端配置规则: certd_ + 配置项, 点号用_代替
# 如jwt密钥配置为 auth.jwt.secret则设置环境变量 certd_auth_jwt_secret=changeme
2023-05-25 09:14:58 +00:00
2023-07-03 02:14:22 +00:00
# 客户端配置项见: packages/ui/certd-client/.env
# 按实际名称配置环境变量即可,如: VITE_APP_API=http://localhost:7001