From a22cf1105abb0e79f73d5bb734287df941c634b4 Mon Sep 17 00:00:00 2001 From: Meng Sen Date: Wed, 30 Oct 2024 11:21:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=20uptime-kuma=202.0=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Meng Sen --- .github/renovate.json | 12 +++++++++++ apps/uptime-kuma/2.0.0/data.yml | 17 ++++++++++++++++ apps/uptime-kuma/2.0.0/docker-compose.yml | 22 +++++++++++++++++++++ apps/uptime-kuma/2.0.0/scripts/init.sh | 15 ++++++++++++++ apps/uptime-kuma/2.0.0/scripts/uninstall.sh | 10 ++++++++++ apps/uptime-kuma/2.0.0/scripts/upgrade.sh | 15 ++++++++++++++ 6 files changed, 91 insertions(+) create mode 100644 apps/uptime-kuma/2.0.0/data.yml create mode 100644 apps/uptime-kuma/2.0.0/docker-compose.yml create mode 100644 apps/uptime-kuma/2.0.0/scripts/init.sh create mode 100644 apps/uptime-kuma/2.0.0/scripts/uninstall.sh create mode 100644 apps/uptime-kuma/2.0.0/scripts/upgrade.sh diff --git a/.github/renovate.json b/.github/renovate.json index 11ecb4b6..2de8edba 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -159,6 +159,18 @@ "apps/jellyfin/10.10.*/*.yml" ], "allowedVersions": ">=10.10" + }, + { + "matchFileNames": [ + "apps/uptime-kuma/1.*/*.yml" + ], + "allowedVersions": "<2.0" + }, + { + "matchFileNames": [ + "apps/uptime-kuma/2.*/*.yml" + ], + "allowedVersions": ">=2.0" } ], "prCreation": "immediate" diff --git a/apps/uptime-kuma/2.0.0/data.yml b/apps/uptime-kuma/2.0.0/data.yml new file mode 100644 index 00000000..a1f697d3 --- /dev/null +++ b/apps/uptime-kuma/2.0.0/data.yml @@ -0,0 +1,17 @@ +additionalProperties: + formFields: + - default: "/home/uptime-kuma" + edit: true + envKey: UPTIME_KUMA_ROOT_PATH + labelZh: 数据持久化路径 + labelEn: Data persistence path + required: true + type: text + - default: 3001 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelZh: WebUI 端口 + labelEn: WebUI port + required: true + rule: paramPort + type: number diff --git a/apps/uptime-kuma/2.0.0/docker-compose.yml b/apps/uptime-kuma/2.0.0/docker-compose.yml new file mode 100644 index 00000000..69f98a65 --- /dev/null +++ b/apps/uptime-kuma/2.0.0/docker-compose.yml @@ -0,0 +1,22 @@ +networks: + 1panel-network: + external: true + +services: + uptime-kuma: + image: louislam/uptime-kuma:2.0.0-beta.0 + container_name: ${CONTAINER_NAME} + labels: + createdBy: "Apps" + restart: always + networks: + - 1panel-network + ports: + - ${PANEL_APP_PORT_HTTP}:3001 + env_file: + - /etc/1panel/envs/global.env + - ${ENV_FILE:-/etc/1panel/envs/default.env} + volumes: + - ${UPTIME_KUMA_ROOT_PATH}/data:/app/data + - ${UPTIME_KUMA_ROOT_PATH}/server:/app/server + - ${UPTIME_KUMA_ROOT_PATH}/db:/app/db diff --git a/apps/uptime-kuma/2.0.0/scripts/init.sh b/apps/uptime-kuma/2.0.0/scripts/init.sh new file mode 100644 index 00000000..77b84912 --- /dev/null +++ b/apps/uptime-kuma/2.0.0/scripts/init.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/uptime-kuma/2.0.0/scripts/uninstall.sh b/apps/uptime-kuma/2.0.0/scripts/uninstall.sh new file mode 100644 index 00000000..c86c4fbc --- /dev/null +++ b/apps/uptime-kuma/2.0.0/scripts/uninstall.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/uptime-kuma/2.0.0/scripts/upgrade.sh b/apps/uptime-kuma/2.0.0/scripts/upgrade.sh new file mode 100644 index 00000000..77b84912 --- /dev/null +++ b/apps/uptime-kuma/2.0.0/scripts/upgrade.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi