Compare commits

..

1 Commits

Author SHA1 Message Date
push-app-to-main[bot]
a69b9ed290 Add checkmate (ct) 2026-02-07 20:05:51 +00:00
6 changed files with 273 additions and 7 deletions

78
ct/checkmate.sh Normal file
View File

@@ -0,0 +1,78 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/bluewave-labs/Checkmate
APP="Checkmate"
var_tags="${var_tags:-monitoring;uptime}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-4096}"
var_disk="${var_disk:-10}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/checkmate ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "checkmate" "bluewave-labs/Checkmate"; then
msg_info "Stopping Services"
systemctl stop checkmate-server checkmate-client nginx
msg_ok "Stopped Services"
msg_info "Backing up Data"
cp /opt/checkmate/server/.env /opt/checkmate_server.env.bak
[ -f /opt/checkmate/client/.env.local ] && cp /opt/checkmate/client/.env.local /opt/checkmate_client.env.local.bak
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "checkmate" "bluewave-labs/Checkmate"
msg_info "Updating Checkmate Server"
cd /opt/checkmate/server
$STD npm install
if [ -f package.json ]; then
grep -q '"build"' package.json && $STD npm run build || true
fi
msg_ok "Updated Checkmate Server"
msg_info "Updating Checkmate Client"
cd /opt/checkmate/client
$STD npm install
VITE_APP_API_BASE_URL="/api/v1" UPTIME_APP_API_BASE_URL="/api/v1" VITE_APP_LOG_LEVEL="warn" $STD npm run build
msg_ok "Updated Checkmate Client"
msg_info "Restoring Data"
mv /opt/checkmate_server.env.bak /opt/checkmate/server/.env
[ -f /opt/checkmate_client.env.local.bak ] && mv /opt/checkmate_client.env.local.bak /opt/checkmate/client/.env.local
msg_ok "Restored Data"
msg_info "Starting Services"
systemctl start checkmate-server checkmate-client nginx
msg_ok "Started Services"
msg_ok "Updated successfully!"
fi
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"

View File

@@ -10,8 +10,8 @@ var_tags="${var_tags:-dev_ops}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-4}"
var_os="${var_os:-ubuntu}"
var_version="${var_version:-24.04}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"

View File

@@ -0,0 +1,48 @@
{
"name": "Checkmate",
"slug": "checkmate",
"categories": [
9
],
"date_created": "2026-02-02",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 5173,
"documentation": "https://github.com/bluewave-labs/Checkmate#readme",
"website": "https://github.com/bluewave-labs/Checkmate",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/checkmate.webp",
"config_path": "/opt/checkmate/server/.env",
"description": "Checkmate is an open source uptime and infrastructure monitoring application that helps you track the availability and performance of your services.",
"install_methods": [
{
"type": "default",
"script": "ct/checkmate.sh",
"resources": {
"cpu": 2,
"ram": 4096,
"hdd": 10,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "Create your admin account on first login via the web interface.",
"type": "info"
},
{
"text": "Server API runs on port 52345, Client UI on port 5173.",
"type": "info"
},
{
"text": "For PageSpeed monitoring, add a Google PageSpeed API key to the server .env file.",
"type": "info"
}
]
}

View File

@@ -22,8 +22,8 @@
"cpu": 2,
"ram": 2048,
"hdd": 4,
"os": "ubuntu",
"version": "24.04"
"os": "debian",
"version": "12"
}
}
],

View File

@@ -0,0 +1,136 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/bluewave-labs/Checkmate
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y \
build-essential \
openssl \
nginx
msg_ok "Installed Dependencies"
MONGO_VERSION="8.0" setup_mongodb
NODE_VERSION="22" setup_nodejs
fetch_and_deploy_gh_release "checkmate" "bluewave-labs/Checkmate"
msg_info "Configuring Checkmate"
JWT_SECRET="$(openssl rand -hex 32)"
cat <<EOF >/opt/checkmate/server/.env
CLIENT_HOST="http://${LOCAL_IP}"
JWT_SECRET="${JWT_SECRET}"
DB_CONNECTION_STRING="mongodb://localhost:27017/checkmate_db"
TOKEN_TTL="99d"
ORIGIN="${LOCAL_IP}"
LOG_LEVEL="info"
SERVER_HOST=0.0.0.0
SERVER_PORT=52345
EOF
cat <<EOF >/opt/checkmate/client/.env.local
VITE_APP_API_BASE_URL="/api/v1"
UPTIME_APP_API_BASE_URL="/api/v1"
VITE_APP_LOG_LEVEL="warn"
EOF
msg_ok "Configured Checkmate"
msg_info "Installing Checkmate Server"
cd /opt/checkmate/server
$STD npm install
$STD npm run build
msg_ok "Installed Checkmate Server"
msg_info "Installing Checkmate Client"
cd /opt/checkmate/client
$STD npm install
VITE_APP_API_BASE_URL="/api/v1" UPTIME_APP_API_BASE_URL="/api/v1" VITE_APP_LOG_LEVEL="warn" $STD npm run build
msg_ok "Installed Checkmate Client"
msg_info "Creating Services"
cat <<EOF >/etc/systemd/system/checkmate-server.service
[Unit]
Description=Checkmate Server
After=network.target mongod.service
[Service]
Type=simple
User=root
WorkingDirectory=/opt/checkmate/server
EnvironmentFile=/opt/checkmate/server/.env
ExecStart=/usr/bin/npm start
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/systemd/system/checkmate-client.service
[Unit]
Description=Checkmate Client
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/checkmate/client
ExecStart=/usr/bin/npm run preview -- --host 127.0.0.1 --port 5173
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
$STD systemctl enable -q --now checkmate-server
$STD systemctl enable -q --now checkmate-client
msg_ok "Created Services"
msg_info "Configuring Nginx Reverse Proxy"
cat <<EOF >/etc/nginx/sites-available/checkmate
server {
listen 80 default_server;
server_name _;
client_max_body_size 100M;
# Client UI
location / {
proxy_pass http://127.0.0.1:5173;
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host \$host;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
}
# API Server
location /api/v1/ {
proxy_pass http://127.0.0.1:52345/api/v1/;
proxy_http_version 1.1;
proxy_set_header Host \$host;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
}
}
EOF
ln -sf /etc/nginx/sites-available/checkmate /etc/nginx/sites-enabled/checkmate
rm -f /etc/nginx/sites-enabled/default
$STD nginx -t
$STD systemctl reload nginx
msg_ok "Configured Nginx Reverse Proxy"
motd_ssh
customize
cleanup_lxc

View File

@@ -14,9 +14,13 @@ network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y \
git \
ansible
$STD apt install -y git
setup_deb822_repo \
"ansible" \
"https://keyserver.ubuntu.com/pks/lookup?fingerprint=on&op=get&search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367" \
"http://ppa.launchpad.net/ansible/ansible/ubuntu" \
"noble"
$STD apt install -y ansible
msg_ok "Installed Dependencies"
fetch_and_deploy_gh_release "semaphore" "semaphoreui/semaphore" "binary" "latest" "/opt/semaphore" "semaphore_*_linux_amd64.deb"