mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-27 16:54:04 +00:00
prepare for docker
This commit is contained in:
parent
5f89940ab6
commit
ae07cd9c35
6 changed files with 32 additions and 7 deletions
4
.dockerignore
Normal file
4
.dockerignore
Normal file
|
@ -0,0 +1,4 @@
|
|||
/.idea
|
||||
/dist
|
||||
/node_modules
|
||||
/data/kuma.db
|
|
@ -1,5 +1,7 @@
|
|||
# Uptime Kuma
|
||||
|
||||
It is a self-hosted monitoring tool like "Uptime Robot".
|
||||
|
||||
# Features
|
||||
|
||||
* Monitoring uptime for HTTP(s) / TCP / Ping.
|
||||
|
@ -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.
|
||||
|
|
10
dockerfile
Normal file
10
dockerfile
Normal file
|
@ -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"]
|
|
@ -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']
|
||||
});
|
||||
|
||||
|
|
|
@ -28,8 +28,9 @@
|
|||
</div>
|
||||
|
||||
<div class="mb-3" v-if="monitor.type === 'keyword' ">
|
||||
<label for="keyword" class="form-label">Keyword <span style="color: #AAA">(search keyword in plain html response)</span></label>
|
||||
<label for="keyword" class="form-label">Keyword</label>
|
||||
<input type="text" class="form-control" id="keyword" v-model="monitor.keyword" required>
|
||||
<div class="form-text">Search keyword in plain html response and it is case-sensitive</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3" v-if="monitor.type === 'port' || monitor.type === 'ping' ">
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
<div class="col-md-6">
|
||||
<h2>Notifications</h2>
|
||||
<p v-if="$root.notificationList.length === 0">Not available, please setup.</p>
|
||||
<p v-else>Please assign the notification to monitor(s) to get it works.</p>
|
||||
|
||||
<ul class="list-group mb-3" style="border-radius: 1rem;">
|
||||
<li class="list-group-item" v-for="notification in $root.notificationList">
|
||||
|
|
Loading…
Reference in a new issue