+ First access the Line Developers Console, create a provider and channel (Messaging API), then you can get the channel access token and user id from the above mentioned menu items.
+
+
-
+
@@ -153,10 +153,6 @@ export default {
}
}
-.hideHeartbeatBar {
- display: none;
-}
-
.monitorItem {
width: 100%;
}
From d218661f3db3231022c561de1f4c62aa1fe0ea2e Mon Sep 17 00:00:00 2001
From: LouisLam
Date: Tue, 17 Aug 2021 23:08:35 +0800
Subject: [PATCH 036/724] wip: implementing install script
---
extra/compile-install-script.ps1 | 3 +-
extra/install.batsh | 69 +++++++++++++++++++++
install.sh | 52 ++++++++++++++++
package.json | 3 +-
test/test_install_script/centos7.dockerfile | 9 +++
5 files changed, 134 insertions(+), 2 deletions(-)
create mode 100644 extra/install.batsh
create mode 100644 install.sh
create mode 100644 test/test_install_script/centos7.dockerfile
diff --git a/extra/compile-install-script.ps1 b/extra/compile-install-script.ps1
index 4b25b55..dd44798 100644
--- a/extra/compile-install-script.ps1
+++ b/extra/compile-install-script.ps1
@@ -1 +1,2 @@
-docker run -it --rm -v ${pwd}:/app louislam/batsh /usr/bin/batsh bash --output ./install.sh ./extra/install.batsh
\ No newline at end of file
+# Must enable File Sharing in Docker Desktop
+docker run -it --rm -v ${pwd}:/app louislam/batsh /usr/bin/batsh bash --output ./install.sh ./extra/install.batsh
diff --git a/extra/install.batsh b/extra/install.batsh
new file mode 100644
index 0000000..005b2db
--- /dev/null
+++ b/extra/install.batsh
@@ -0,0 +1,69 @@
+println("=====================");
+println("Uptime Kuma Installer");
+println("=====================");
+println("");
+println("---------------------------------------");
+println("This script is designed for Linux and basic usage.");
+println("For advanced usage, please go to https://github.com/louislam/uptime-kuma/wiki/Installation");
+println("---------------------------------------");
+println("");
+println("Local - Install Uptime Kuma in your current machine with git, Node.js 14 and pm2");
+println("Docker - Install Uptime Kuma Docker container");
+println("");
+
+if ("$1" != "") {
+ type = "$1";
+} else {
+ call("read", "-p", "Which installation method do you prefer? [DOCKER/local]: ", "type");
+}
+
+if (type == "local") {
+
+ if ("$1" != "") {
+ port = "$3";
+ } else {
+ call("read", "-p", "Listening Port [3001]: ", "port");
+ }
+
+ if (exists("/etc/redhat-release")) {
+ os = call("cat", "/etc/redhat-release");
+ distribution = "rhel";
+ }
+
+ bash("arch=$(uname -i)");
+
+ println("Your OS: " ++ os);
+ println("Distribution: " ++ distribution);
+ println("Arch: " ++ arch);
+
+ if (distribution == "rhel") {
+ bash("nodePath=$(command -v node)");
+
+ if (nodePath != "") {
+ bash("nodeVersion=$(node -e 'console.log(process.versions.node.split(`.`)[0])')");
+ println("Node Version: " ++ nodeVersion);
+
+ if (nodeVersion < "12") {
+ println("Error: Required Node.js 14");
+ call("exit", "1");
+
+ } else {
+ if (nodeVersion == "12") {
+ println("Warning: NodeJS " ++ nodeVersion ++ " is not tested.");
+ }
+ println("OK");
+ }
+
+ } else {
+
+ }
+
+
+
+ call("yum", "install", "git", "-y");
+ }
+
+} else {
+ call("read", "-p", "Expose Port [3001]: ", "port");
+ call("read", "-p", "Volume Name [uptime-kuma]: ", "volume");
+}
diff --git a/install.sh b/install.sh
new file mode 100644
index 0000000..8e9c828
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,52 @@
+"echo" "-e" "====================="
+"echo" "-e" "Uptime Kuma Installer"
+"echo" "-e" "====================="
+"echo" "-e" ""
+"echo" "-e" "---------------------------------------"
+"echo" "-e" "This script is designed for Linux and basic usage."
+"echo" "-e" "For advanced usage, please go to https://github.com/louislam/uptime-kuma/wiki/Installation"
+"echo" "-e" "---------------------------------------"
+"echo" "-e" ""
+"echo" "-e" "Local - Install Uptime Kuma in your current machine with git, Node.js 14 and pm2"
+"echo" "-e" "Docker - Install Uptime Kuma Docker container"
+"echo" "-e" ""
+"echo" "-e" "$1"
+if [ "$1" != "" ]; then
+ type="$1"
+else
+ "read" "-p" "Which installation method do you prefer? [DOCKER/local]: " "type"
+fi
+if [ "$type" == "local" ]; then
+ "read" "-p" "Listening Port [3001]: " "port"
+ if [ -e "/etc/redhat-release" ]; then
+ os=$("cat" "/etc/redhat-release")
+ distribution="rhel"
+fi
+ arch=$(uname -i)
+ "echo" "-e" "Your OS: ""$os"
+ "echo" "-e" "Distribution: ""$distribution"
+ "echo" "-e" "Arch: ""$arch"
+ if [ "$distribution" == "rhel" ]; then
+ nodePath=$(command -v node)
+ if [ "$nodePath" != "" ]; then
+ nodeVersion=$(node -e 'console.log(process.versions.node.split(`.`)[0])')
+ "echo" "-e" "Node Version: ""$nodeVersion"
+ _0="12"
+ if [ $(($nodeVersion < $_0)) == 1 ]; then
+ "echo" "-e" "Error: Required Node.js 14"
+ "exit" "1"
+ else
+ if [ "$nodeVersion" == "12" ]; then
+ "echo" "-e" "Warning: NodeJS ""$nodeVersion"" is not tested."
+fi
+ "echo" "-e" "OK"
+ fi
+ else
+-
+ fi
+ "yum" "install" "git" "-y"
+fi
+else
+ "read" "-p" "Expose Port [3001]: " "port"
+ "read" "-p" "Volume Name [uptime-kuma]: " "volume"
+fi
diff --git a/package.json b/package.json
index 8918068..c0ef04f 100644
--- a/package.json
+++ b/package.json
@@ -24,7 +24,8 @@
"update-version": "node extra/update-version.js",
"mark-as-nightly": "node extra/mark-as-nightly.js",
"reset-password": "node extra/reset-password.js",
- "compile-install-script": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command ./extra/compile-install-script.ps1"
+ "compile-install-script": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command ./extra/compile-install-script.ps1",
+ "test-install-script": "docker build --no-cache -f test/test_install_script/centos7.dockerfile ."
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.36",
diff --git a/test/test_install_script/centos7.dockerfile b/test/test_install_script/centos7.dockerfile
new file mode 100644
index 0000000..ef3ec5b
--- /dev/null
+++ b/test/test_install_script/centos7.dockerfile
@@ -0,0 +1,9 @@
+FROM centos:7
+
+RUN useradd -ms /bin/bash test_user
+USER test_user
+WORKDIR /home/test_user
+
+COPY ./install.sh .
+RUN ls
+RUN bash install.sh local /opt/uptime-kuma 3000 0.0.0.0
From 8a48f5dd7174c3bbe36920ec8240eb59823c3605 Mon Sep 17 00:00:00 2001
From: Ismail D
Date: Tue, 17 Aug 2021 17:59:34 +0200
Subject: [PATCH 037/724] Fix typo in README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 285f147..7984a31 100644
--- a/README.md
+++ b/README.md
@@ -34,7 +34,7 @@ Browse to http://localhost:3001 after started.
If you want to change **port** and **volume**, or need to browse via a reserve proxy, please read wiki.
-### 💪🏻 Without Docker (Recommanded for x86/x64 only)
+### 💪🏻 Without Docker (Recommended for x86/x64 only)
Required Tools: Node.js >= 14, git and pm2.
From f72cdcc663ba7a909599dbe6e456a8b7142a554f Mon Sep 17 00:00:00 2001
From: Nelson Chan
Date: Wed, 18 Aug 2021 11:40:20 +0800
Subject: [PATCH 038/724] Feat: Add time to beat tooltip, misc. fixes
---
src/components/HeartbeatBar.vue | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/components/HeartbeatBar.vue b/src/components/HeartbeatBar.vue
index ddd1617..1f4ec1e 100644
--- a/src/components/HeartbeatBar.vue
+++ b/src/components/HeartbeatBar.vue
@@ -7,7 +7,7 @@
class="beat"
:class="{ 'empty' : (beat === 0), 'down' : (beat.status === 0), 'pending' : (beat.status === 2) }"
:style="beatStyle"
- :title="beat.msg"
+ :title="getBeatTitle(beat)"
/>
@@ -21,7 +21,10 @@ export default {
type: String,
default: "big",
},
- monitorId: Number,
+ monitorId: {
+ type: Number,
+ required: true,
+ },
},
data() {
return {
@@ -36,9 +39,6 @@ export default {
computed: {
beatList() {
- if (! (this.monitorId in this.$root.heartbeatList)) {
- this.$root.heartbeatList[this.monitorId] = [];
- }
return this.$root.heartbeatList[this.monitorId]
},
@@ -113,6 +113,11 @@ export default {
unmounted() {
window.removeEventListener("resize", this.resize);
},
+ beforeMount() {
+ if (! (this.monitorId in this.$root.heartbeatList)) {
+ this.$root.heartbeatList[this.monitorId] = [];
+ }
+ },
mounted() {
if (this.size === "small") {
this.beatWidth = 5.6;
@@ -129,6 +134,10 @@ export default {
this.maxBeat = Math.floor(this.$refs.wrap.clientWidth / (this.beatWidth + this.beatMargin * 2))
}
},
+
+ getBeatTitle(beat) {
+ return `${this.$root.datetime(beat.time)} - ${beat.msg}`;
+ }
},
}
From 269ac2410b2b586bacd8654ca972f4960ebab0f5 Mon Sep 17 00:00:00 2001
From: LouisLam
Date: Wed, 18 Aug 2021 14:55:03 +0800
Subject: [PATCH 039/724] install.sh add supports for CentOS
---
extra/install.batsh | 93 ++++++++++++++++---
install.sh | 84 ++++++++++++++---
test/test_install_script/centos7.dockerfile | 5 -
test/test_install_script/centos8.dockerfile | 4 +
.../test_install_script/ubuntu1604.dockerfile | 4 +
5 files changed, 157 insertions(+), 33 deletions(-)
create mode 100644 test/test_install_script/centos8.dockerfile
create mode 100644 test/test_install_script/ubuntu1604.dockerfile
diff --git a/extra/install.batsh b/extra/install.batsh
index 005b2db..a89254f 100644
--- a/extra/install.batsh
+++ b/extra/install.batsh
@@ -1,9 +1,13 @@
+// install.sh is generated by ./extra/install.batsh, do not modify it directly.
+// "npm run compile-install-script" to compile install.sh
+// The command is working on Windows PowerShell and Docker for Windows only.
println("=====================");
println("Uptime Kuma Installer");
println("=====================");
println("");
println("---------------------------------------");
println("This script is designed for Linux and basic usage.");
+println("Tested with CentOS 7/8");
println("For advanced usage, please go to https://github.com/louislam/uptime-kuma/wiki/Installation");
println("---------------------------------------");
println("");
@@ -18,16 +22,19 @@ if ("$1" != "") {
}
if (type == "local") {
-
- if ("$1" != "") {
- port = "$3";
- } else {
- call("read", "-p", "Listening Port [3001]: ", "port");
- }
+ defaultPort = "3001";
+ defaultInstallPath = "/opt/uptime-kuma";
if (exists("/etc/redhat-release")) {
os = call("cat", "/etc/redhat-release");
distribution = "rhel";
+
+ } else if (exists("/etc/issue")) {
+ bash("os=$(head -n1 /etc/issue | cut -f 1 -d ' ')");
+ if (os == "Ubuntu") {
+ distribution = "ubuntu";
+ }
+
}
bash("arch=$(uname -i)");
@@ -36,33 +43,89 @@ if (type == "local") {
println("Distribution: " ++ distribution);
println("Arch: " ++ arch);
+ if ("$3" != "") {
+ port = "$3";
+ } else {
+ call("read", "-p", "Listening Port [$port]: ", "port");
+
+ if (port == "") {
+ port = defaultPort;
+ }
+ }
+
+ if ("$2" != "") {
+ installPath = "$2";
+ } else {
+ call("read", "-p", "Installation Path [$installPath]: ", "installPath");
+
+ if (installPath == "") {
+ installPath = defaultInstallPath;
+ }
+ }
+
if (distribution == "rhel") {
- bash("nodePath=$(command -v node)");
+ bash("nodeCheck=$(node -v)");
- if (nodePath != "") {
+ if (nodeCheck != "") {
bash("nodeVersion=$(node -e 'console.log(process.versions.node.split(`.`)[0])')");
println("Node Version: " ++ nodeVersion);
if (nodeVersion < "12") {
println("Error: Required Node.js 14");
call("exit", "1");
-
- } else {
- if (nodeVersion == "12") {
- println("Warning: NodeJS " ++ nodeVersion ++ " is not tested.");
- }
- println("OK");
}
+ if (nodeVersion == "12") {
+ println("Warning: NodeJS " ++ nodeVersion ++ " is not tested.");
+ }
} else {
+ bash("curlCheck=$(curl --version)");
+ if (curlCheck == "") {
+ println("Installing Curl");
+ bash("yum -y -q install curl");
+ }
+
+ println("Installing Node.js 14");
+ bash("curl -sL https://rpm.nodesource.com/setup_14.x | bash - > log.txt");
+ bash("yum install -y -q nodejs");
+ bash("node -v");
+
+ bash("nodeCheckAgain=$(node -v)");
+
+ if (nodeCheckAgain == "") {
+ println("Error during Node.js installation");
+ bash("exit 1");
+ }
}
+ bash("check=$(git --version)");
+ if (check == "") {
+ println("Installing Git");
+ bash("yum -y -q install git");
+ }
+ bash("check=$(pm2 --version)");
+ if (check == "") {
+ println("Installing PM2");
+ bash("npm install pm2 -g");
+ bash("pm2 startup");
+ }
+
+ bash("mkdir -p $installPath");
+ bash("cd $installPath");
+ bash("git clone https://github.com/louislam/uptime-kuma.git .");
+ bash("npm run setup");
- call("yum", "install", "git", "-y");
+ bash("pm2 start npm --name uptime-kuma -- run start-server -- --port=$port");
+ bash("pm2 list");
}
+ if (distribution == "ubuntu") {
+ println("TODO");
+ // TODO
+ }
+
} else {
call("read", "-p", "Expose Port [3001]: ", "port");
call("read", "-p", "Volume Name [uptime-kuma]: ", "volume");
diff --git a/install.sh b/install.sh
index 8e9c828..2d4479a 100644
--- a/install.sh
+++ b/install.sh
@@ -1,50 +1,108 @@
+# install.sh is generated by ./extra/install.batsh, do not modify it directly.
+# "npm run compile-install-script" to compile install.sh
+# The command is working on Windows PowerShell and Docker for Windows only.
"echo" "-e" "====================="
"echo" "-e" "Uptime Kuma Installer"
"echo" "-e" "====================="
"echo" "-e" ""
"echo" "-e" "---------------------------------------"
"echo" "-e" "This script is designed for Linux and basic usage."
+"echo" "-e" "Tested with CentOS 7/8"
"echo" "-e" "For advanced usage, please go to https://github.com/louislam/uptime-kuma/wiki/Installation"
"echo" "-e" "---------------------------------------"
"echo" "-e" ""
"echo" "-e" "Local - Install Uptime Kuma in your current machine with git, Node.js 14 and pm2"
"echo" "-e" "Docker - Install Uptime Kuma Docker container"
"echo" "-e" ""
-"echo" "-e" "$1"
if [ "$1" != "" ]; then
type="$1"
else
"read" "-p" "Which installation method do you prefer? [DOCKER/local]: " "type"
fi
if [ "$type" == "local" ]; then
- "read" "-p" "Listening Port [3001]: " "port"
+ defaultPort="3001"
+ defaultInstallPath="/opt/uptime-kuma"
if [ -e "/etc/redhat-release" ]; then
os=$("cat" "/etc/redhat-release")
- distribution="rhel"
+ distribution="rhel"
+ else
+ if [ -e "/etc/issue" ]; then
+ os=$(head -n1 /etc/issue | cut -f 1 -d ' ')
+ if [ "$os" == "Ubuntu" ]; then
+ distribution="ubuntu"
+fi
fi
+ fi
arch=$(uname -i)
"echo" "-e" "Your OS: ""$os"
"echo" "-e" "Distribution: ""$distribution"
"echo" "-e" "Arch: ""$arch"
+ if [ "$3" != "" ]; then
+ port="$3"
+ else
+ "read" "-p" "Listening Port [$port]: " "port"
+ if [ "$port" == "" ]; then
+ port="$defaultPort"
+fi
+ fi
+ if [ "$2" != "" ]; then
+ installPath="$2"
+ else
+ "read" "-p" "Installation Path [$installPath]: " "installPath"
+ if [ "$installPath" == "" ]; then
+ installPath="$defaultInstallPath"
+fi
+ fi
if [ "$distribution" == "rhel" ]; then
- nodePath=$(command -v node)
- if [ "$nodePath" != "" ]; then
+ nodeCheck=$(node -v)
+ if [ "$nodeCheck" != "" ]; then
nodeVersion=$(node -e 'console.log(process.versions.node.split(`.`)[0])')
"echo" "-e" "Node Version: ""$nodeVersion"
_0="12"
if [ $(($nodeVersion < $_0)) == 1 ]; then
"echo" "-e" "Error: Required Node.js 14"
- "exit" "1"
- else
- if [ "$nodeVersion" == "12" ]; then
- "echo" "-e" "Warning: NodeJS ""$nodeVersion"" is not tested."
+ "exit" "1"
+fi
+ if [ "$nodeVersion" == "12" ]; then
+ "echo" "-e" "Warning: NodeJS ""$nodeVersion"" is not tested."
fi
- "echo" "-e" "OK"
- fi
else
--
+ curlCheck=$(curl --version)
+ if [ "$curlCheck" == "" ]; then
+ "echo" "-e" "Installing Curl"
+ yum -y -q install curl
+fi
+ "echo" "-e" "Installing Node.js 14"
+ curl -sL https://rpm.nodesource.com/setup_14.x | bash - > log.txt
+ yum install -y -q nodejs
+ node -v
+ nodeCheckAgain=$(node -v)
+ if [ "$nodeCheckAgain" == "" ]; then
+ "echo" "-e" "Error during Node.js installation"
+ exit 1
+fi
fi
- "yum" "install" "git" "-y"
+ check=$(git --version)
+ if [ "$check" == "" ]; then
+ "echo" "-e" "Installing Git"
+ yum -y -q install git
+fi
+ check=$(pm2 --version)
+ if [ "$check" == "" ]; then
+ "echo" "-e" "Installing PM2"
+ npm install pm2 -g
+ pm2 startup
+fi
+ mkdir -p $installPath
+ cd $installPath
+ git clone https://github.com/louislam/uptime-kuma.git .
+ npm run setup
+ pm2 start npm --name uptime-kuma -- run start-server -- --port=$port
+ pm2 list
+fi
+ if [ "$distribution" == "ubuntu" ]; then
+ "echo" "-e" "TODO"
+ # TODO
fi
else
"read" "-p" "Expose Port [3001]: " "port"
diff --git a/test/test_install_script/centos7.dockerfile b/test/test_install_script/centos7.dockerfile
index ef3ec5b..6e50b91 100644
--- a/test/test_install_script/centos7.dockerfile
+++ b/test/test_install_script/centos7.dockerfile
@@ -1,9 +1,4 @@
FROM centos:7
-RUN useradd -ms /bin/bash test_user
-USER test_user
-WORKDIR /home/test_user
-
COPY ./install.sh .
-RUN ls
RUN bash install.sh local /opt/uptime-kuma 3000 0.0.0.0
diff --git a/test/test_install_script/centos8.dockerfile b/test/test_install_script/centos8.dockerfile
new file mode 100644
index 0000000..7a121f7
--- /dev/null
+++ b/test/test_install_script/centos8.dockerfile
@@ -0,0 +1,4 @@
+FROM centos:8
+
+COPY ./install.sh .
+RUN bash install.sh local /opt/uptime-kuma 3000 0.0.0.0
diff --git a/test/test_install_script/ubuntu1604.dockerfile b/test/test_install_script/ubuntu1604.dockerfile
new file mode 100644
index 0000000..8cc6e14
--- /dev/null
+++ b/test/test_install_script/ubuntu1604.dockerfile
@@ -0,0 +1,4 @@
+FROM ubuntu:16.04
+
+COPY ./install.sh .
+RUN bash install.sh local /opt/uptime-kuma 3000 0.0.0.0
From 60b0ee2959d911c721cafee0e8c9ce3be61e3a34 Mon Sep 17 00:00:00 2001
From: Carl Sander
Date: Wed, 18 Aug 2021 08:38:05 +0000
Subject: [PATCH 040/724] added K8s-Deployment and edited README
---
README.md | 4 +++
kubernetes/README.md | 27 ++++++++++++++++
kubernetes/kustomization.yml | 10 ++++++
kubernetes/uptime-kuma/deployment.yml | 34 +++++++++++++++++++++
kubernetes/uptime-kuma/ingressroute.yml | 39 ++++++++++++++++++++++++
kubernetes/uptime-kuma/kustomization.yml | 5 +++
kubernetes/uptime-kuma/pvc.yml | 10 ++++++
kubernetes/uptime-kuma/service.yml | 13 ++++++++
8 files changed, 142 insertions(+)
create mode 100644 kubernetes/README.md
create mode 100644 kubernetes/kustomization.yml
create mode 100644 kubernetes/uptime-kuma/deployment.yml
create mode 100644 kubernetes/uptime-kuma/ingressroute.yml
create mode 100644 kubernetes/uptime-kuma/kustomization.yml
create mode 100644 kubernetes/uptime-kuma/pvc.yml
create mode 100644 kubernetes/uptime-kuma/service.yml
diff --git a/README.md b/README.md
index 7984a31..8297067 100644
--- a/README.md
+++ b/README.md
@@ -31,6 +31,10 @@ docker run -d --restart=always -p 3001:3001 -v uptime-kuma:/app/data --name upti
Browse to http://localhost:3001 after started.
+### ☸️ Kubernetes
+
+See more [here](kubernetes/README.md)
+
If you want to change **port** and **volume**, or need to browse via a reserve proxy, please read wiki.
diff --git a/kubernetes/README.md b/kubernetes/README.md
new file mode 100644
index 0000000..1f243b5
--- /dev/null
+++ b/kubernetes/README.md
@@ -0,0 +1,27 @@
+# Uptime-Kuma K8s Deployment
+## How does it work?
+
+Kustomize is a tool which builds a complete deployment file for all config elements.
+You can edit the files in the ```uptime-kuma``` folder except the ```kustomization.yml``` until you know what you're doing.
+
+It creates a certificate with the specified Issuer and creates the Ingress for the Uptime-Kuma ClusterIP-Service
+
+## What do i have to edit?
+You have to edit the ```ingressroute.yml``` to your needs.
+This ingressroute.yml is for the [nginx-ingress-controller](https://kubernetes.github.io/ingress-nginx/) in combination with the [cert-manager](https://cert-manager.io/).
+
+- host
+- secrets and secret names
+- (Cluster)Issuer (optional)
+- the Version in the Deployment-File
+ - update:
+ - change to newer version and run the above commands, it will update the pods one after another
+
+## How To use:
+
+- install [kustomize](https://kubectl.docs.kubernetes.io/installation/kustomize/)
+- Edit files mentioned above to your needs
+- run ```kustomize build > apply.yml```
+- run ```kubectl apply -f apply.yml```
+
+Now you should see some k8s magic and Uptime-Kuma should be available at the specified address.
\ No newline at end of file
diff --git a/kubernetes/kustomization.yml b/kubernetes/kustomization.yml
new file mode 100644
index 0000000..0daf10f
--- /dev/null
+++ b/kubernetes/kustomization.yml
@@ -0,0 +1,10 @@
+namespace: uptime-kuma
+namePrefix: uptime-kuma-
+
+commonLabels:
+ app: uptime-kuma
+
+bases:
+ - uptime-kuma
+
+
diff --git a/kubernetes/uptime-kuma/deployment.yml b/kubernetes/uptime-kuma/deployment.yml
new file mode 100644
index 0000000..9ea1bdf
--- /dev/null
+++ b/kubernetes/uptime-kuma/deployment.yml
@@ -0,0 +1,34 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ labels:
+ component: uptime-kuma
+ name: uptime-kuma
+spec:
+ selector:
+ matchLabels:
+ component: uptime-kuma
+ replicas: 3
+ strategy:
+ rollingUpdate:
+ maxSurge: 1
+ maxUnavailable: 1
+ type: RollingUpdate
+
+ template:
+ metadata:
+ labels:
+ component: uptime-kuma
+ spec:
+ containers:
+ - name: uptime-kuma
+ image: louislam/uptime-kuma:1.2.0
+ ports:
+ - containerPort: 3001
+ volumeMounts:
+ - mountPath: /app/data
+ name: uptime-kuma-storage
+ volumes:
+ - name: uptime-kuma-storage
+ persistentVolumeClaim:
+ claimName: uptime-kuma-pvc
diff --git a/kubernetes/uptime-kuma/ingressroute.yml b/kubernetes/uptime-kuma/ingressroute.yml
new file mode 100644
index 0000000..66ad6fb
--- /dev/null
+++ b/kubernetes/uptime-kuma/ingressroute.yml
@@ -0,0 +1,39 @@
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+ annotations:
+ kubernetes.io/ingress.class: nginx
+ cert-manager.io/cluster-issuer: letsencrypt-prod
+ nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
+ nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
+ nginx.ingress.kubernetes.io/server-snippets: |
+ location / {
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_http_version 1.1;
+ proxy_set_header X-Forwarded-Host $http_host;
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_set_header X-Forwarded-For $remote_addr;
+ proxy_set_header Host $host;
+ proxy_set_header Connection "upgrade";
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_cache_bypass $http_upgrade;
+ }
+ name: uptime-kuma-ingress
+spec:
+ tls:
+ - hosts:
+ - monitor.cxde.link
+ secretName: monitor-cxde-link-tls
+ rules:
+ - host: monitor.cxde.link
+ http:
+ paths:
+ - path: /
+ pathType: Prefix
+ backend:
+ service:
+ name: uptime-kuma-uptime-kuma
+ port:
+ number: 3001
diff --git a/kubernetes/uptime-kuma/kustomization.yml b/kubernetes/uptime-kuma/kustomization.yml
new file mode 100644
index 0000000..638a2ab
--- /dev/null
+++ b/kubernetes/uptime-kuma/kustomization.yml
@@ -0,0 +1,5 @@
+resources:
+ - deployment.yml
+ - service.yml
+ - ingressroute.yml
+ - pvc.yml
\ No newline at end of file
diff --git a/kubernetes/uptime-kuma/pvc.yml b/kubernetes/uptime-kuma/pvc.yml
new file mode 100644
index 0000000..c20e5d0
--- /dev/null
+++ b/kubernetes/uptime-kuma/pvc.yml
@@ -0,0 +1,10 @@
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+ name: uptime-kuma-pvc
+spec:
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 4Gi
\ No newline at end of file
diff --git a/kubernetes/uptime-kuma/service.yml b/kubernetes/uptime-kuma/service.yml
new file mode 100644
index 0000000..67f50a3
--- /dev/null
+++ b/kubernetes/uptime-kuma/service.yml
@@ -0,0 +1,13 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: uptime-kuma
+spec:
+ selector:
+ component: uptime-kuma
+ type: ClusterIP
+ ports:
+ - name: http
+ port: 3001
+ targetPort: 3001
+ protocol: TCP
From cf5168a4e6e13c14d2c8553077f285dadcee0320 Mon Sep 17 00:00:00 2001
From: Nelson Chan
Date: Wed, 18 Aug 2021 12:21:16 +0800
Subject: [PATCH 041/724] Fix: Resize chart on screen breakpoints
---
src/components/PingChart.vue | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/components/PingChart.vue b/src/components/PingChart.vue
index 596ca00..53a8379 100644
--- a/src/components/PingChart.vue
+++ b/src/components/PingChart.vue
@@ -1,5 +1,5 @@
-
+
+
+
diff --git a/src/pages/Dashboard.vue b/src/pages/Dashboard.vue
index 5db7040..7070179 100644
--- a/src/pages/Dashboard.vue
+++ b/src/pages/Dashboard.vue
@@ -1,38 +1,13 @@