diff --git a/README.md b/README.md index 34e34020f..02392c230 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ It is a temporary live demo, all data will be deleted after 10 minutes. Sponsore ### 🐳 Docker ```bash -docker run -d --restart=always -p 3001:3001 -v uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma:1 +docker run -d --restart=always -p 3001:3001 -v uptime-kuma:/app/data --hostname uptime-kuma --name uptime-kuma louislam/uptime-kuma:1 ``` Uptime Kuma is now running on . @@ -52,7 +52,7 @@ Uptime Kuma is now running on . > If you want to limit exposure to localhost (without exposing port for other users or to use a [reverse proxy](https://github.com/louislam/uptime-kuma/wiki/Reverse-Proxy)), you can expose the port like this: > > ```bash -> docker run -d --restart=always -p 127.0.0.1:3001:3001 -v uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma:1 +> docker run -d --restart=always -p 127.0.0.1:3001:3001 -v uptime-kuma:/app/data --hostname uptime-kuma --name uptime-kuma louislam/uptime-kuma:1 > ``` ### 💪🏻 Non-Docker diff --git a/compose.yaml b/compose.yaml index 004705a63..42fb50d65 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,5 +1,6 @@ services: uptime-kuma: + hostname: uptime-kuma image: louislam/uptime-kuma:1 volumes: - ./data:/app/data diff --git a/server/model/monitor.js b/server/model/monitor.js index 58decbcba..92afb5c73 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -24,6 +24,7 @@ const { CookieJar } = require("tough-cookie"); const { HttpsCookieAgent } = require("http-cookie-agent/http"); const https = require("https"); const http = require("http"); +const os = require('os'); const rootCertificates = rootCertificatesFingerprints(); @@ -1288,7 +1289,7 @@ class Monitor extends BeanModel { text = "🔴 Down"; } - let msg = `[${monitor.name}] [${text}] ${bean.msg}`; + let msg = `[${os.hostname()}] [${monitor.name}] [${text}] ${bean.msg}`; for (let notification of notificationList) { try {