mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-09-15 16:07:03 +08:00
Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
f48f957ba9 | ||
|
bfb117cb76 | ||
|
2b8e33caed | ||
|
386c8bfdf1 | ||
|
126f00e739 | ||
|
80466ac957 | ||
|
3b52433202 | ||
|
137f5da3da | ||
|
338d002d42 | ||
|
77ab9fbc57 |
@@ -2,3 +2,4 @@
|
|||||||
/dist
|
/dist
|
||||||
/node_modules
|
/node_modules
|
||||||
/data/kuma.db
|
/data/kuma.db
|
||||||
|
/.do
|
||||||
|
10
README.md
10
README.md
@@ -1,5 +1,8 @@
|
|||||||
# Uptime Kuma
|
# Uptime Kuma
|
||||||
|
|
||||||
|
<a target="_blank" href="https://github.com/louislam/uptime-kuma"><img src="https://img.shields.io/github/stars/louislam/uptime-kuma" /></a> <a target="_blank" href="https://hub.docker.com/r/louislam/uptime-kuma"><img src="https://img.shields.io/docker/pulls/louislam/uptime-kuma" /></a> <a target="_blank" href="https://hub.docker.com/r/louislam/uptime-kuma"><img src="https://img.shields.io/docker/v/louislam/uptime-kuma/latest?label=docker%20image%20ver." /></a> <a target="_blank" href="https://github.com/louislam/uptime-kuma"><img src="https://img.shields.io/github/last-commit/louislam/uptime-kuma" /></a>
|
||||||
|
|
||||||
|
|
||||||
<div align="center" width="100%">
|
<div align="center" width="100%">
|
||||||
<img src="./public/icon.svg" width="128" alt="" />
|
<img src="./public/icon.svg" width="128" alt="" />
|
||||||
</div>
|
</div>
|
||||||
@@ -18,6 +21,9 @@ It is a self-hosted monitoring tool like "Uptime Robot".
|
|||||||
# How to Use
|
# How to Use
|
||||||
|
|
||||||
### Docker
|
### Docker
|
||||||
|
|
||||||
|
⚠ For someone, who are using Raspberry Pi 3<=, please keep using 1.0.1.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Create a volume
|
# Create a volume
|
||||||
docker volume create uptime-kuma
|
docker volume create uptime-kuma
|
||||||
@@ -70,11 +76,13 @@ Choose Cheapest Plan is enough. (US$ 5)
|
|||||||
|
|
||||||
Re-pull the latest docker image and create another container with the same volume.
|
Re-pull the latest docker image and create another container with the same volume.
|
||||||
|
|
||||||
|
PS: For every new release, it takes some time to build the docker image, please be patient if it is not available yet.
|
||||||
|
|
||||||
### Without Docker
|
### Without Docker
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git fetch --all
|
git fetch --all
|
||||||
git checkout 1.0.3 --force
|
git checkout 1.0.4 --force
|
||||||
npm install
|
npm install
|
||||||
npm run build
|
npm run build
|
||||||
pm2 restart uptime-kuma
|
pm2 restart uptime-kuma
|
||||||
|
37
dockerfile
37
dockerfile
@@ -1,18 +1,35 @@
|
|||||||
FROM node:14-alpine3.14
|
# DON'T UPDATE TO alpine3.13, 1.14, see #41.
|
||||||
|
FROM node:14-alpine3.12
|
||||||
# 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 ln -s /usr/bin/python3 /usr/bin/python
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# split the sqlite install here, so that it can caches the arm prebuilt
|
||||||
|
RUN apk add --no-cache --virtual .build-deps make g++ python3 python3-dev && \
|
||||||
|
ln -s /usr/bin/python3 /usr/bin/python && \
|
||||||
|
npm install sqlite3@5.0.2 bcrypt@5.0.1 && \
|
||||||
|
apk del .build-deps
|
||||||
|
|
||||||
|
# Touching above code may causes sqlite3 re-compile again, painful slow.
|
||||||
|
|
||||||
|
# Install apprise
|
||||||
|
# Hate pip!!! I never run pip install successfully in first run for anything in my life without Google :/
|
||||||
|
# Compilation Fail 1 => Google Search "alpine ffi.h" => Add libffi-dev
|
||||||
|
# Compilation Fail 2 => Google Search "alpine cargo" => Add cargo
|
||||||
|
# Compilation Fail 3 => Google Search "alpine opensslv.h" => Add openssl-dev
|
||||||
|
# Compilation Fail 4 => Google Search "alpine opensslv.h" again => Change to libressl-dev musl-dev
|
||||||
|
# Compilation Fail 5 => Google Search "ERROR: libressl3.3-libtls-3.3.3-r0: trying to overwrite usr/lib/libtls.so.20 owned by libretls-3.3.3-r0." again => Change back to openssl-dev with musl-dev
|
||||||
|
ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1
|
||||||
|
RUN apk add --no-cache python3
|
||||||
|
RUN apk add --no-cache --virtual .build-deps libffi-dev musl-dev openssl-dev cargo py3-pip python3-dev && \
|
||||||
|
pip3 install apprise && \
|
||||||
|
apk del .build-deps
|
||||||
|
|
||||||
|
# New things add here
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm install
|
RUN npm install
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Remove built tools
|
|
||||||
RUN apk del make g++
|
|
||||||
|
|
||||||
EXPOSE 3001
|
EXPOSE 3001
|
||||||
VOLUME ["/app/data"]
|
VOLUME ["/app/data"]
|
||||||
CMD ["npm", "run", "start-server"]
|
CMD ["npm", "run", "start-server"]
|
||||||
|
|
||||||
|
@@ -1,15 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "uptime-kuma",
|
"name": "uptime-kuma",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --host",
|
"dev": "vite --host",
|
||||||
"start-server": "node server/server.js",
|
"start-server": "node server/server.js",
|
||||||
"update": "",
|
"update": "",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"vite-preview-dist": "vite preview --host",
|
"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": "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.4 . --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",
|
"setup": "git checkout 1.0.4 && npm install && npm run build",
|
||||||
"version-global-replace": "node extra/version-global-replace.js"
|
"version-global-replace": "node extra/version-global-replace.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@@ -19,6 +19,22 @@ class Notification {
|
|||||||
return false;
|
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") {
|
} else if (notification.type === "webhook") {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
<option value="smtp">Email (SMTP)</option>
|
<option value="smtp">Email (SMTP)</option>
|
||||||
<option value="discord">Discord</option>
|
<option value="discord">Discord</option>
|
||||||
<option value="signal">Signal</option>
|
<option value="signal">Signal</option>
|
||||||
|
<option value="gotify">Gotify</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -169,6 +170,20 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template v-if="notification.type === 'gotify'">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="gotify-application-token" class="form-label">Application Token</label>
|
||||||
|
<input type="text" class="form-control" id="gotify-application-token" required v-model="notification.gotifyapplicationToken">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="gotify-server-url" class="form-label">Server URL</label>
|
||||||
|
<div class="input-group mb-3">
|
||||||
|
<input type="text" class="form-control" id="gotify-server-url" required v-model="notification.gotifyserverurl">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-danger" @click="deleteConfirm" :disabled="processing" v-if="id">Delete</button>
|
<button type="button" class="btn btn-danger" @click="deleteConfirm" :disabled="processing" v-if="id">Delete</button>
|
||||||
|
Reference in New Issue
Block a user