docker compose 安装部署
vim docker-compose.yml
docker-compose.yml 配置文件内容:
version: '3.0'
services:
uptime-kuma:
container_name: uptime-kuma-dev
image: jeckshi/uptime-kuma:v3.2
volumes:
- ./data:/app/data
#- ./feishu.js:/app/server/notification-providers/feishu.js
#- ../server:/app/server
#- ../db:/app/db
ports:
- "3001:3001" # <Host Port>:<Container Port>
- "3307:3306"
# 启动
docker compose up -d
对接飞书报警通知模板修改
if (heartbeatJSON["status"] === DOWN) {
let downdata = {
msg_type: "interactive",
card: {
elements: [
{
tag: "div",
text: {
content:
"🚩 **Status**:[Down] " +
`${heartbeatJSON["msg"]}` +
"\n" +
"🌐 **URL Link**: " +
`${monitorJSON["url"]}` +
"\n" +
"⏰ **Update Time**: " +
`${heartbeatJSON["localDateTime"]}` +
"\n",
tag: "lark_md",
},
},
{
tag: "div",
text: {
content: "<at id=all></at>",
tag: "lark_md",
},
},
],
header: {
template: "red",
title: {
content:
"📢 UptimeKuma Alert: [Down] " +
`${monitorJSON["name"]}`,
tag: "plain_text",
},
},
},
};
打赏一下!