Skip to content

Commit 5db685f

Browse files
PatchMon (#8632)
Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> Co-authored-by: CanbiZ <[email protected]>
1 parent 14027a6 commit 5db685f

File tree

4 files changed

+404
-0
lines changed

4 files changed

+404
-0
lines changed

ct/headers/patchmon

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
____ __ __ __ ___
2+
/ __ \____ _/ /______/ /_ / |/ /___ ____
3+
/ /_/ / __ `/ __/ ___/ __ \/ /|_/ / __ \/ __ \
4+
/ ____/ /_/ / /_/ /__/ / / / / / / /_/ / / / /
5+
/_/ \__,_/\__/\___/_/ /_/_/ /_/\____/_/ /_/
6+

ct/patchmon.sh

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: vhsdream
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/PatchMon/PatchMon
7+
8+
APP="PatchMon"
9+
var_tags="${var_tags:-monitoring}"
10+
var_cpu="${var_cpu:-2}"
11+
var_ram="${var_ram:-2048}"
12+
var_disk="${var_disk:-4}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-13}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
27+
if [[ ! -d "/opt/patchmon" ]]; then
28+
msg_error "No ${APP} Installation Found!"
29+
exit
30+
fi
31+
32+
NODE_VERSION="24" setup_nodejs
33+
if check_for_gh_release "PatchMon" "PatchMon/PatchMon"; then
34+
msg_info "Stopping Service"
35+
systemctl stop patchmon-server
36+
msg_ok "Stopped Service"
37+
38+
msg_info "Creating Backup"
39+
cp /opt/patchmon/backend/.env /opt/backend.env
40+
cp /opt/patchmon/frontend/.env /opt/frontend.env
41+
msg_ok "Backup Created"
42+
43+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "PatchMon" "PatchMon/PatchMon" "tarball" "latest" "/opt/patchmon"
44+
45+
msg_info "Updating PatchMon"
46+
cd /opt/patchmon
47+
export NODE_ENV=production
48+
$STD npm install --no-audit --no-fund --no-save --ignore-scripts
49+
cd /opt/patchmon/backend
50+
$STD npm install --no-audit --no-fund --no-save --ignore-scripts
51+
cd /opt/patchmon/frontend
52+
$STD npm install --include=dev --no-audit --no-fund --no-save --ignore-scripts
53+
$STD npm run build
54+
cd /opt/patchmon/backend
55+
mv /opt/backend.env /opt/patchmon/backend/.env
56+
mv /opt/frontend.env /opt/patchmon/frontend/.env
57+
$STD npx prisma migrate deploy
58+
$STD npx prisma generate
59+
msg_ok "Updated PatchMon"
60+
61+
msg_info "Starting Service"
62+
systemctl start patchmon-server
63+
msg_ok "Started Service"
64+
msg_ok "Updated Successfully!"
65+
fi
66+
exit
67+
}
68+
69+
start
70+
build_container
71+
description
72+
73+
msg_ok "Completed Successfully!\n"
74+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
75+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
76+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"

frontend/public/json/patchmon.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "PatchMon",
3+
"slug": "patchmon",
4+
"categories": [
5+
9
6+
],
7+
"date_created": "2025-10-23",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 3399,
12+
"documentation": "https://docs.patchmon.net",
13+
"website": "https://patchmon.net",
14+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/patchmon.webp",
15+
"config_path": "/opt/patchmon/backend/.env, /opt/patchmon/frontend/.env",
16+
"description": "Monitor Linux patches across all your hosts with real-time visibility, security update tracking, and comprehensive package management.",
17+
"install_methods": [
18+
{
19+
"type": "default",
20+
"script": "ct/patchmon.sh",
21+
"resources": {
22+
"cpu": 2,
23+
"ram": 2048,
24+
"hdd": 4,
25+
"os": "debian",
26+
"version": "13"
27+
}
28+
}
29+
],
30+
"default_credentials": {
31+
"username": null,
32+
"password": null
33+
},
34+
"notes": []
35+
}

0 commit comments

Comments
 (0)