prepare for docker

pull/6/head
LouisLam 3 years ago
parent 5f89940ab6
commit ae07cd9c35

@ -0,0 +1,4 @@
/.idea
/dist
/node_modules
/data/kuma.db

@ -1,5 +1,7 @@
# Uptime Kuma # Uptime Kuma
It is a self-hosted monitoring tool like "Uptime Robot".
# Features # Features
* Monitoring uptime for HTTP(s) / TCP / Ping. * Monitoring uptime for HTTP(s) / TCP / Ping.
@ -17,7 +19,7 @@ One-click Deploy to DigitalOcean
# Motivation # 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. * Want to build a fancy UI.
* Learn Vue 3 and vite.js. * Learn Vue 3 and vite.js.
* Show the power of Bootstrap 5. * Show the power of Bootstrap 5.

@ -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() { created() {
socket = io(":3001", { let wsHost;
if (localStorage.dev === "dev") {
wsHost = ":3001"
} else {
wsHost = ""
}
socket = io(wsHost, {
transports: ['websocket'] transports: ['websocket']
}); });

@ -28,8 +28,9 @@
</div> </div>
<div class="mb-3" v-if="monitor.type === 'keyword' "> <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> <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>
<div class="mb-3" v-if="monitor.type === 'port' || monitor.type === 'ping' "> <div class="mb-3" v-if="monitor.type === 'port' || monitor.type === 'ping' ">

@ -53,6 +53,7 @@
<div class="col-md-6"> <div class="col-md-6">
<h2>Notifications</h2> <h2>Notifications</h2>
<p v-if="$root.notificationList.length === 0">Not available, please setup.</p> <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;"> <ul class="list-group mb-3" style="border-radius: 1rem;">
<li class="list-group-item" v-for="notification in $root.notificationList"> <li class="list-group-item" v-for="notification in $root.notificationList">

Loading…
Cancel
Save