mirror of
https://github.com/certd/certd.git
synced 2026-04-23 11:37:23 +08:00
chore: 优化安装脚本
This commit is contained in:
@@ -98,7 +98,7 @@ https://certd.handfree.work/
|
||||
|
||||
5. 【推荐】[一键安装脚本](https://certd.docmirror.cn/guide/install/docker/)(自动安装 Docker,Certd):
|
||||
```bash
|
||||
curl -fsSL https://raw.atomgit.com/certd/certd/raw/v2/docker/run/install.sh | bash
|
||||
curl -fsSL https://gitee.com/certd/certd/raw/v2/docker/run/install.sh | bash
|
||||
```
|
||||
|
||||
6. 【不推荐】[源码方式部署 ](https://certd.docmirror.cn/guide/install/source/)
|
||||
|
||||
+5
-19
@@ -3,7 +3,7 @@ set -e
|
||||
|
||||
CERTD_VERSION="${CERTD_VERSION:-latest}"
|
||||
INSTALL_DIR="${INSTALL_DIR:-/opt/certd}"
|
||||
COMPOSE_FILE_URL="https://raw.atomgit.com/certd/certd/raw/v2/docker/run/docker-compose.yaml"
|
||||
COMPOSE_FILE_URL="https://gitee.com/certd/certd/raw/v2/docker/run/docker-compose.yaml"
|
||||
COMPOSE_FILE="$INSTALL_DIR/docker-compose.yaml"
|
||||
|
||||
DOCKER_MIRROR="https://mirrors.aliyun.com"
|
||||
@@ -320,29 +320,15 @@ main() {
|
||||
COMPOSE_INSTALLED=true
|
||||
|
||||
if ! check_docker; then
|
||||
DOCKER_INSTALLED=false
|
||||
echo ""
|
||||
read -p "是否安装 Docker? (y/n): " -n 1 -r
|
||||
echo ""
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
install_docker
|
||||
else
|
||||
log_error "Docker 是必需组件,脚本退出"
|
||||
exit 1
|
||||
fi
|
||||
log_info "正在安装 Docker..."
|
||||
install_docker
|
||||
fi
|
||||
|
||||
if ! check_docker_compose; then
|
||||
COMPOSE_INSTALLED=false
|
||||
echo ""
|
||||
read -p "是否安装 Docker Compose? (y/n): " -n 1 -r
|
||||
echo ""
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
install_docker_compose
|
||||
else
|
||||
log_error "Docker Compose 是必需组件,脚本退出"
|
||||
exit 1
|
||||
fi
|
||||
log_info "正在安装 Docker Compose..."
|
||||
install_docker_compose
|
||||
fi
|
||||
|
||||
download_compose_file
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
如果您的服务器未安装 Docker,该脚本会自动为您安装 Docker 和 Docker Compose,并启动 Certd 容器。
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.atomgit.com/certd/certd/raw/v2/docker/run/install.sh | bash
|
||||
curl -fsSL https://gitee.com/certd/certd/raw/v2/docker/run/install.sh | bash
|
||||
```
|
||||
|
||||
> 支持 Ubuntu、Debian、CentOS、Rocky Linux、AlmaLinux 等主流发行版。
|
||||
|
||||
Reference in New Issue
Block a user