From 3b52433202ee683e8e0bf502035140094f656039 Mon Sep 17 00:00:00 2001 From: LouisLam Date: Wed, 14 Jul 2021 12:42:52 +0800 Subject: [PATCH 1/6] cache the sqlite built when docker build --- dockerfile | 9 +++++---- package.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dockerfile b/dockerfile index 390c4f5fe..10e4ac7c6 100644 --- a/dockerfile +++ b/dockerfile @@ -1,11 +1,12 @@ FROM node:14-alpine3.14 +WORKDIR /app -# sqlite have to build on arm -# TODO: use prebuilt sqlite for arm, because it is very very slow. -RUN apk add --no-cache make g++ python3 +RUN apk add --no-cache make g++ python3 py3-pip python3-dev RUN ln -s /usr/bin/python3 /usr/bin/python -WORKDIR /app +# split the sqlite install here, so that it can caches the arm prebuilt +RUN npm install sqlite3@5.0.2 + COPY . . RUN npm install RUN npm run build diff --git a/package.json b/package.json index 478e3d41c..46ff2b34b 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "build": "vite build", "vite-preview-dist": "vite preview --host", "build-docker": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma -t louislam/uptime-kuma:1 -t louislam/uptime-kuma:1.0.3 . --push", - "build-docker-nightly": "docker buildx build --platform linux/amd64 -t louislam/uptime-kuma:nightly . --push", + "build-docker-nightly": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:nightly . --push", "setup": "git checkout 1.0.3 && npm install && npm run build", "version-global-replace": "node extra/version-global-replace.js" }, From 80466ac9575e10d76d39cb20eae61291adbd1d30 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Wed, 14 Jul 2021 17:10:51 +0800 Subject: [PATCH 2/6] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 69f1f49fd..8d13fa169 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,9 @@ It is a self-hosted monitoring tool like "Uptime Robot". # How to Use ### Docker + +⚠ For someone, who are using Raspberry Pi 3<=, please keep using 1.0.1. + ```bash # Create a volume docker volume create uptime-kuma From 126f00e739728056af00d3dab53cbb56499397ae Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Wed, 14 Jul 2021 11:25:10 +0200 Subject: [PATCH 3/6] =?UTF-8?q?=E2=9C=A8=20added=20Gotify=20Support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/notification.js | 16 ++++++++++++++++ src/components/NotificationDialog.vue | 15 +++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/server/notification.js b/server/notification.js index 8e3419527..ffd030cb0 100644 --- a/server/notification.js +++ b/server/notification.js @@ -19,6 +19,22 @@ class Notification { return false; } + } else if (notification.type === "gotify") { + try { + if (notification.gotifyserverurl.endsWith("/")) { + notification.gotifyserverurl = notification.gotifyserverurl.slice(0, -1); + } + await axios.post(`${notification.gotifyserverurl}/message?token=${notification.gotifyapplicationToken}`, { + "message": msg, + "priority": 8, + "title": "Uptime-Kuma" + }) + return true; + } catch (error) { + console.log(error) + return false; + } + } else if (notification.type === "webhook") { try { diff --git a/src/components/NotificationDialog.vue b/src/components/NotificationDialog.vue index 44454d688..d08cb5019 100644 --- a/src/components/NotificationDialog.vue +++ b/src/components/NotificationDialog.vue @@ -18,6 +18,7 @@ + @@ -169,6 +170,20 @@ + + @@ -175,7 +176,6 @@ -
@@ -183,6 +183,20 @@
+ +