From daea415e11caad77ca51e0a8375a2f2a68278396 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sun, 3 Dec 2023 19:14:43 +0100 Subject: [PATCH] added proper notes and block highlighting (#69) --- API-Keys.md | 13 +++++++------ OpenRC-Script.md | 6 +++--- Prometheus-Integration.md | 2 +- Reset-Password-via-CLI.md | 2 +- Reverse-Proxy.md | 4 ++-- Systemd-Unit-File.md | 6 ++++-- πŸ”§-How-to-Install.md | 3 ++- 7 files changed, 20 insertions(+), 16 deletions(-) diff --git a/API-Keys.md b/API-Keys.md index f8972d8..f42c15c 100644 --- a/API-Keys.md +++ b/API-Keys.md @@ -39,17 +39,17 @@ Authentication is done by passing the API key in the `Authorization` header. For example, here is a request made with curl to the `metrics` endpoint. -``` +```bash curl -u":" uptime.kuma/metrics ``` -Note, the `:` is required before the key as basic authentication -requires a username and password separated by a `:`, however we don't -make use of the username field. +> [!NOTE] +> `:` is required before the key, because basic authentication requires a username and password separated by a `:`. +> We don't make use of the username field. Here is an example config for Prometheus: -``` +```yml - job_name: 'uptime' scrape_interval: 30s scheme: http @@ -59,4 +59,5 @@ Here is an example config for Prometheus: password: ``` -Note: we don't need to set a username field as it is not used. +> [!NOTE] +> Seting the username field is not nessesary, as it is unused. diff --git a/OpenRC-Script.md b/OpenRC-Script.md index 0465960..0dd776f 100644 --- a/OpenRC-Script.md +++ b/OpenRC-Script.md @@ -45,20 +45,20 @@ start_post() { Set the script to executable. -```sh +```bash sudo chmod 755 /etc/init.d/uptime-kuma ``` Create a user and group `uptime-kuma:uptime-kuma` for the service. -```sh +```bash 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 ``` Start the service and add it to default runlevel if preferred. -```sh +```bash sudo rc-service uptime-kuma start sudo rc-update add uptime-kuma ``` diff --git a/Prometheus-Integration.md b/Prometheus-Integration.md index dc70d91..88a9614 100644 --- a/Prometheus-Integration.md +++ b/Prometheus-Integration.md @@ -16,7 +16,7 @@ Labels to filter by include: Put the following into your Prometheus config: -``` +```yml - job_name: 'uptime' scrape_interval: 30s scheme: http diff --git a/Reset-Password-via-CLI.md b/Reset-Password-via-CLI.md index 87ee336..2d604e1 100644 --- a/Reset-Password-via-CLI.md +++ b/Reset-Password-via-CLI.md @@ -1,6 +1,6 @@ ## With Docker -``` +```bash docker exec -it bash npm run reset-password ``` diff --git a/Reverse-Proxy.md b/Reverse-Proxy.md index 5284005..4983101 100644 --- a/Reverse-Proxy.md +++ b/Reverse-Proxy.md @@ -166,7 +166,7 @@ Link to https-portal Websocket under [Advanced Usage](https://github.com/SteveLT Example docker-compose.yml file using Https-Portal: -``` +```yml version: '3.3' services: @@ -224,7 +224,7 @@ docker run -d --restart=always -p 127.0.0.1:3002:3001 -v uptime-kuma:/app/data - 7. Click `Create` -> `Websockets`, this automatically fills in the required headers for websockets. # Traefik -``` +```yml labels: - "traefik.enable=true" - "traefik.http.routers.uptime-kuma.rule=Host(`YourOwnHostname`)" diff --git a/Systemd-Unit-File.md b/Systemd-Unit-File.md index 5fcbe78..76a84bb 100644 --- a/Systemd-Unit-File.md +++ b/Systemd-Unit-File.md @@ -17,13 +17,15 @@ Restart=on-failure WantedBy=multi-user.target ``` -Note: This unit file assumes that you are running the software as a separate 'uptime' user. If you have node/npm installed in a different path, you will need to alter the ExecStart line to match this. +> [!NOTE] +> This unit file assumes that you are running the software as a separate 'uptime' user. +> If you have node/npm installed in a different path, you will need to alter the ExecStart line to match this. This unit file may be installed to /etc/systemd/system/uptime-kuma.service (Or whatever service name you'd prefer) Once installed, issue the following commands to reload systemd unit files, enable it to start on boot, and start it immediately: -```sh +```bash systemctl daemon-reload systemctl enable --now uptime-kuma ``` \ No newline at end of file diff --git a/πŸ”§-How-to-Install.md b/πŸ”§-How-to-Install.md index 8fef9fd..279fc43 100644 --- a/πŸ”§-How-to-Install.md +++ b/πŸ”§-How-to-Install.md @@ -115,7 +115,8 @@ https://github.com/louislam/uptime-kuma/wiki/Reverse-Proxy ### ☸️ 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. \ +> [!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)