mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-05-30 02:12:34 +02:00
Merge remote-tracking branch 'origin/master'
commit
22cc58ba8b
5 changed files with 96 additions and 4 deletions
66
OpenRC-Script.md
Normal file
66
OpenRC-Script.md
Normal file
|
@ -0,0 +1,66 @@
|
|||
For Alpine/postmarketOS/Gentoo/Artix, you can create an OpenRC service as
|
||||
`/etc/init.d/uptime-kuma`:
|
||||
|
||||
```sh
|
||||
#!/sbin/openrc-run
|
||||
|
||||
description="Uptime Kuma self-hosted monitoring tool"
|
||||
|
||||
# Change $directory to path to uptime-kuma
|
||||
directory=${directory:-/usr/share/uptime-kuma}
|
||||
pidfile=${pidfile:-/run/$RC_SVCNAME.pid}
|
||||
|
||||
log_dir="/var/log/$RC_SVCNAME"
|
||||
output_log="${output_log:-$log_dir/output.log}"
|
||||
error_log="${error_log:-$log_dir/error.log}"
|
||||
|
||||
command=${command:-/usr/bin/node}
|
||||
command_args="$directory/server/server.js"
|
||||
command_user=${command_user:-uptime-kuma:uptime-kuma}
|
||||
command_background=true
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath --owner=$command_user --directory $log_dir \
|
||||
$directory/data \
|
||||
$directory/data/upload
|
||||
checkpath --owner=$command_user --file $log_dir/*.log \
|
||||
$directory/data/error.log \
|
||||
$directory/data/kuma.db
|
||||
}
|
||||
|
||||
start_post() {
|
||||
# Wait for the server to be started
|
||||
sleep 10
|
||||
}
|
||||
```
|
||||
|
||||
Set the script to executable.
|
||||
|
||||
```sh
|
||||
sudo chmod 755 /etc/init.d/uptime-kuma
|
||||
```
|
||||
|
||||
Create a user and group `uptime-kuma:uptime-kuma` for the service.
|
||||
|
||||
```sh
|
||||
sudo addgroup -S uptime-kuma
|
||||
sudo adduser -S -D -h /var/lib/uptime-kuma -s /sbin/nologin -G uptime-kuma -g uptime-kuma uptime-kuma
|
||||
```
|
||||
|
||||
If the database is not initialized, it has to be run fisrt.
|
||||
|
||||
```sh
|
||||
cd /usr/share/uptime-kuma
|
||||
sudo -u uptime-kuma node server/server.js
|
||||
```
|
||||
|
||||
Start the service and add it to default runlevel if prefered.
|
||||
|
||||
```sh
|
||||
sudo rc-service uptime-kuma start
|
||||
sudo rc-update add uptime-kuma
|
||||
```
|
|
@ -69,9 +69,10 @@ With SSL:
|
|||
|
||||
ProxyPass / http://localhost:3001/
|
||||
RewriteEngine on
|
||||
RewriteCond %{HTTP:Upgrade} websocket [NC]
|
||||
RewriteCond %{HTTP:Connection} upgrade [NC]
|
||||
RewriteRule ^/?(.*) "ws://localhost:3001/$1" [P,L]
|
||||
RewriteCond %{HTTP:Upgrade} =websocket
|
||||
RewriteRule /(.*) ws://localhost:3001/$1 [P,L]
|
||||
RewriteCond %{HTTP:Upgrade} !=websocket
|
||||
RewriteRule /(.*) http://localhost:3001/$1 [P,L]
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
|
|
16
Troubleshooting.md
Normal file
16
Troubleshooting.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
|
||||
## Uptime Kuma reports DOWN, but I can access.
|
||||
|
||||
If your Uptime Kuma reports DOWN of your service, sometimes you would like to know it is a bug of Uptime Kuma or your own Docker network issue.
|
||||
|
||||
Go into your container's bash.
|
||||
|
||||
```
|
||||
docker exec -it uptime-kuma bash
|
||||
```
|
||||
|
||||
Then you can test with these commands for example:
|
||||
```
|
||||
curl https://google.com
|
||||
ping google.com
|
||||
```
|
|
@ -34,7 +34,7 @@ cd <uptime-kuma-directory>
|
|||
|
||||
# Update from git
|
||||
git fetch --all
|
||||
git checkout 1.17.0 --force
|
||||
git checkout 1.17.1 --force
|
||||
|
||||
# Install dependencies and prebuilt
|
||||
npm install --production
|
||||
|
|
|
@ -132,6 +132,15 @@ https://github.com/louislam/uptime-kuma/wiki/Reverse-Proxy
|
|||
|
||||
See more [here](https://github.com/louislam/uptime-kuma/tree/k8s-unofficial/kubernetes)
|
||||
|
||||
### ☸️ OpenShift 4 and Kubernetes Helm 3 Chart (Unofficial)
|
||||
|
||||
> Note: This Chart relies on a repackaged OCI Container Image, which lets *uptime-kuma* run as **non-root** user. \
|
||||
> The entire repackage process is automated via GitHub Actions and renovate-bot keeps everything up to date. (feel free to audit it yourself)
|
||||
|
||||
The Containerfile used to rebundle *uptime-kuma*: [rootless Containerfile](https://github.com/k3rnelpan1c-dev/uptime-kuma-helm/blob/main/container/Containerfile)
|
||||
|
||||
https://github.com/k3rnelpan1c-dev/uptime-kuma-helm
|
||||
|
||||
### Ansible (Unofficial)
|
||||
|
||||
https://github.com/louislam/uptime-kuma/tree/ansible-unofficial/ansible
|
||||
|
|
Loading…
Add table
Reference in a new issue