diff --git a/Dockerfile b/Dockerfile index 0f2b706c..47aa4840 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,6 @@ EXPOSE 80 COPY ./resources/demo/nginx.conf /etc/nginx/sites-available/default COPY ./resources/demo/app.ini /app/app.ini COPY ./resources/demo/demo.db /app/database.db -COPY ./resources/demo/install.sh /app/install.sh COPY ./resources/demo/start.sh /app/start.sh COPY ./nginx-ui-server /app/nginx-ui RUN cd /app && chmod a+x start.sh diff --git a/README-zh_CN.md b/README-zh_CN.md index 919e523f..6bfc0a0f 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -64,6 +64,11 @@ Nginx 网络管理界面,由 [0xJacky](https://jackyu.cn/) 与 [Hintay](https [![Dashboard](resources/screenshots/dashboard.png)]() +### 在线预览 +网址:[https://nginxui.jackyu.cn](https://nginxui.jackyu.cn) +- 用户名:admin +- 密码:admin + ### 特色 - 在线查看服务器 CPU、内存、系统负载、磁盘使用率等指标 diff --git a/README.md b/README.md index f108b8bf..7bbc5ed2 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,11 @@ Yet another Nginx Web UI, developed by [0xJacky](https://jackyu.cn/) and [Hintay [![Dashboard](resources/screenshots/dashboard.png)]() +### Demo +URL:[https://nginxui.jackyu.cn](https://nginxui.jackyu.cn) +- username:admin +- password:admin + ### Features - Online view of server CPU, Memory, Load Average, Disk Usage and other indicators. diff --git a/frontend/version.json b/frontend/version.json index f72e5044..793ec064 100644 --- a/frontend/version.json +++ b/frontend/version.json @@ -1 +1 @@ -{"version":"1.2.0","build_id":3,"total_build":43} \ No newline at end of file +{"version":"1.2.0","build_id":4,"total_build":44} \ No newline at end of file diff --git a/resources/demo/install.sh b/resources/demo/install.sh deleted file mode 100644 index 1a078ba3..00000000 --- a/resources/demo/install.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env bash - -PROXY="" -RPROXY="https://ghproxy.com/" - -MACHINE="amd64" - -# Font color -FontBlack="\033[30m"; -FontRed="\033[31m"; -FontGreen="\033[32m"; -FontYellow="\033[33m"; -FontBlue="\033[34m"; -FontPurple="\033[35m"; -FontSkyBlue="\033[36m"; -FontWhite="\033[37m"; -FontSuffix="\033[0m"; - -get_latest_version() { - # Get latest release version number - local latest_release - if ! latest_release=$(curl -x "${PROXY}" -sS -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/0xJacky/nginx-ui/releases/latest"); then - echo -e "${FontRed}error: Failed to get release list, please check your network.${FontSuffix}" - exit 1 - fi - - RELEASE_LATEST="$(echo "$latest_release" | sed 'y/,/\n/' | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')" - if [[ -z "$RELEASE_LATEST" ]]; then - if echo "$latest_release" | grep -q "API rate limit exceeded"; then - echo -e "${FontRed}error: github API rate limit exceeded${FontSuffix}" - else - echo -e "${FontRed}error: Failed to get the latest release version.${FontSuffix}" - echo "Welcome bug report: https://github.com/0xJacky/nginx-ui/issues" - fi - exit 1 - fi - RELEASE_LATEST="v${RELEASE_LATEST#v}" -} - -download_nginx_ui() { - local download_link - download_link="${RPROXY}https://github.com/0xJacky/nginx-ui/releases/download/$RELEASE_LATEST/nginx-ui-linux-$MACHINE.tar.gz" - - echo "Downloading Nginx UI archive: $download_link" - if ! curl -x "${PROXY}" -R -H 'Cache-Control: no-cache' -L -o "$TAR_FILE" "$download_link"; then - echo 'error: Download failed! Please check your network or try again.' - return 1 - fi - return 0 -} - -decompression() { - echo "$1" - if ! tar -zxf "$1" -C "$TMP_DIRECTORY"; then - echo -e "${FontRed}error: Nginx UI decompression failed.${FontSuffix}" - "rm" -r "$TMP_DIRECTORY" - echo "removed: $TMP_DIRECTORY" - exit 1 - fi - echo "info: Extract the Nginx UI package to $TMP_DIRECTORY and prepare it for installation." -} - -install_bin() { - NAME="nginx-ui" - install -m 755 "${TMP_DIRECTORY}/$NAME" "/app/$NAME" -} - -main() { - # Important Variables - TMP_DIRECTORY="$(mktemp -d)" - TAR_FILE="${TMP_DIRECTORY}/nginx-ui-linux-$MACHINE.tar.gz" - get_latest_version - download_nginx_ui - decompression "$TAR_FILE" - install_bin -} - -main "$@"