diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..b97db4abb --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +/.idea +/dist +/node_modules +/data/kuma.db diff --git a/README.md b/README.md index 34948fe59..71c226f60 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,12 @@ # Uptime Kuma +It is a self-hosted monitoring tool like "Uptime Robot". + # Features * Monitoring uptime for HTTP(s) / TCP / Ping. * Fancy, Reactive, Fast UI/UX. -* Notifications via Webhook, Telegram, Discord and email (SMTP). +* Notifications via Webhook, Telegram, Discord and email (SMTP). * 20 seconds interval. # How to Use @@ -17,7 +19,7 @@ One-click Deploy to DigitalOcean # Motivation -* I was looking for a self-hosted monitoring tool like "Uptime Robot", but it is hard to find a suitable one. +* I was looking for a self-hosted monitoring tool like "Uptime Robot", but it is hard to find a suitable one. One of the close one is statping. Unfortunately, it is not stable and unmaintained. * Want to build a fancy UI. * Learn Vue 3 and vite.js. * Show the power of Bootstrap 5. diff --git a/dockerfile b/dockerfile new file mode 100644 index 000000000..cf7dd5013 --- /dev/null +++ b/dockerfile @@ -0,0 +1,10 @@ +FROM node:14 + +WORKDIR /app +COPY . . +RUN npm install +RUN npm run build + +EXPOSE 3001 +VOLUME ["/app/data"] +CMD ["npm", "run", "start-server"] diff --git a/src/mixins/socket.js b/src/mixins/socket.js index 38d58136c..cd96672db 100644 --- a/src/mixins/socket.js +++ b/src/mixins/socket.js @@ -29,7 +29,14 @@ export default { }, created() { - socket = io(":3001", { + let wsHost; + if (localStorage.dev === "dev") { + wsHost = ":3001" + } else { + wsHost = "" + } + + socket = io(wsHost, { transports: ['websocket'] }); diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue index 1128ef5a8..f108b8ff2 100644 --- a/src/pages/EditMonitor.vue +++ b/src/pages/EditMonitor.vue @@ -27,10 +27,11 @@ -
Not available, please setup.
+Please assign the notification to monitor(s) to get it works.