修改安装脚本

This commit is contained in:
Erope 2021-04-11 20:41:14 +08:00
parent d016ca027e
commit 4b1f487907
2 changed files with 4 additions and 1 deletions

View File

@ -2,7 +2,7 @@ version: "3.3"
services: services:
dashboard: dashboard:
image: ghcr.io/naiba/nezha-dashboard image: image_url
restart: always restart: always
volumes: volumes:
- ./data:/dashboard/data - ./data:/dashboard/data

View File

@ -67,11 +67,13 @@ pre_check() {
GITHUB_URL="github.com" GITHUB_URL="github.com"
Get_Docker_URL="get.docker.com" Get_Docker_URL="get.docker.com"
Get_Docker_Argu=" " Get_Docker_Argu=" "
Docker_IMG="ghcr.io/naiba/nezha-dashboard"
else else
GITHUB_RAW_URL="cdn.jsdelivr.net/gh/naiba/nezha@master" GITHUB_RAW_URL="cdn.jsdelivr.net/gh/naiba/nezha@master"
GITHUB_URL="dn-dao-github-mirror.daocloud.io" GITHUB_URL="dn-dao-github-mirror.daocloud.io"
Get_Docker_URL="get.daocloud.io/docker" Get_Docker_URL="get.daocloud.io/docker"
Get_Docker_Argu=" -s docker --mirror Aliyun" Get_Docker_Argu=" -s docker --mirror Aliyun"
Docker_IMG="registry.cn-shanghai.aliyuncs.com/erope/nezha-dashboard"
fi fi
} }
@ -264,6 +266,7 @@ modify_dashboard_config() {
sed -i "s/nz_site_title/${nz_site_title}/" ${NZ_DASHBOARD_PATH}/data/config.yaml sed -i "s/nz_site_title/${nz_site_title}/" ${NZ_DASHBOARD_PATH}/data/config.yaml
sed -i "s/nz_site_port/${nz_site_port}/" ${NZ_DASHBOARD_PATH}/docker-compose.yaml sed -i "s/nz_site_port/${nz_site_port}/" ${NZ_DASHBOARD_PATH}/docker-compose.yaml
sed -i "s/nz_grpc_port/${nz_grpc_port}/" ${NZ_DASHBOARD_PATH}/docker-compose.yaml sed -i "s/nz_grpc_port/${nz_grpc_port}/" ${NZ_DASHBOARD_PATH}/docker-compose.yaml
sed -i "s/image_url/${Docker_IMG}/" ${NZ_DASHBOARD_PATH}/docker-compose.yaml
echo -e "面板配置 ${green}修改成功,请稍等重启生效${plain}" echo -e "面板配置 ${green}修改成功,请稍等重启生效${plain}"