diff --git a/README.md b/README.md index 96030c0..f0a8631 100644 --- a/README.md +++ b/README.md @@ -117,5 +117,4 @@ token, chat ID) are intentionally redacted from that file. - Put Uptime Kuma behind a custom domain / HTTPS via reverse proxy (Ghaymah already terminates HTTPS on its own subdomains, so this is optional for the POC). -- Consider Telegram bot token rotation before handing this off, since - the token was shared in a chat during setup. + diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..3e5f11b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,39 @@ +version: "3.8" + +# Documents the services deployed on Ghaymah Cloud. +# This file is for documentation / local reproduction purposes — the +# actual deployment was done through the Ghaymah Apps UI, which manages +# its own container runtime rather than reading docker-compose.yml directly. + +services: + uptime-kuma: + image: louislam/uptime-kuma:2 + container_name: uptime-kuma + restart: unless-stopped + ports: + - "3001:3001" + volumes: + - uptime-kuma-data:/app/data + + demo-web-server: + image: nginx + container_name: demo-web-server + restart: unless-stopped + ports: + - "80:80" + + status-page: + image: nginx:alpine + container_name: status-page + restart: unless-stopped + ports: + - "8080:80" + volumes: + - ./status-page/index.html:/usr/share/nginx/html/index.html:ro + - ./status-page/nginx.conf:/etc/nginx/conf.d/default.conf:ro + # Serves the custom GitHub-style status page on port 8080. + # nginx also proxies /kuma-api/ → Uptime Kuma so the browser avoids CORS. + +volumes: + uptime-kuma-data: + driver: local \ No newline at end of file diff --git a/status-page/index.html b/status-page/index.html new file mode 100644 index 0000000..2f55d9b --- /dev/null +++ b/status-page/index.html @@ -0,0 +1,616 @@ + + + + + + Ghaymah Status + + + + + + + + + + + + + + + +
+
+
+ + + + + + + diff --git a/status-page/nginx.conf b/status-page/nginx.conf new file mode 100644 index 0000000..e0670de --- /dev/null +++ b/status-page/nginx.conf @@ -0,0 +1,21 @@ +server { + listen 80; + server_name _; + + # Serve the static status page + location / { + root /usr/share/nginx/html; + index index.html; + try_files $uri $uri/ /index.html; + } + + # Proxy Uptime Kuma API — avoids CORS issues entirely (same-origin from browser's perspective) + location /kuma-api/ { + proxy_pass https://uptime-kuma-web-3aa83c30.hosted.cumin.dev/; + proxy_ssl_server_name on; + proxy_set_header Host uptime-kuma-web-3aa83c30.hosted.cumin.dev; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Accept-Encoding ""; + } +} diff --git a/uptime-kuma-config-export.json b/uptime-kuma-config-export.json index c122656..c6ebb26 100644 --- a/uptime-kuma-config-export.json +++ b/uptime-kuma-config-export.json @@ -2,7 +2,7 @@ "export_info": { "note": "Manual configuration export. This Uptime Kuma version (2.5.4) does not expose a Settings > Backup/Export screen, so this file was assembled by hand from the live dashboard to document the POC exactly as deployed.", "exported_by": "Mahmoud", - "export_date": "2026-09-16", + "export_date": "2026-09-17", "uptime_kuma_version": "2.5.4" }, "infrastructure": { @@ -55,6 +55,17 @@ "resend_notification_if_down_x_times": 0, "method": "GET", "notes": "Originally pointed at https://httpstat.us/200 (unstable, returned intermittent 502s), then https://httpbin.org/status/200 for stability testing, finally switched to the self-owned nginx demo server above." + }, + { + "friendly_name": "test uptime kuma", + "monitor_type": "HTTP(s)", + "url": "https://uptime-kuma-web-3aa83c30.hosted.cumin.dev/", + "heartbeat_interval_seconds": 60, + "retries": 0, + "request_timeout_seconds": 48, + "resend_notification_if_down_x_times": 0, + "method": "GET", + "notes": "Self-monitoring — Uptime Kuma watching itself to detect if the monitoring service goes down." } ], "notifications": [ @@ -76,12 +87,29 @@ "groups": [ { "name": "Services", - "monitors": ["test app"] + "monitors": ["test app", "test uptime kuma"] } ], "refresh_interval_seconds": 300, "theme": "Auto" }, + "custom_status_page": { + "description": "A custom GitHub-style status page built with HTML/CSS/JS, served via nginx. Fetches live data from Uptime Kuma's public API and displays it in a premium UI with heartbeat bars and uptime percentages.", + "files": [ + "status-page/index.html", + "status-page/nginx.conf" + ], + "local_port": 8080, + "data_source": "Uptime Kuma Public API — /api/status-page/ghaymah-status and /api/status-page/heartbeat/ghaymah-status", + "proxy": "nginx proxies /kuma-api/ to the Uptime Kuma instance to eliminate CORS issues", + "features": [ + "Real-time data from Uptime Kuma API", + "90-heartbeat uptime bars per monitor", + "24h and 30d uptime percentages", + "Auto-refresh every 60 seconds", + "Operational / Degraded / Down status indicators with animated pulse" + ] + }, "testing_performed": [ { "test": "DOWN detection", @@ -97,6 +125,11 @@ "test": "Telegram alerting", "method": "Observed notifications during the Down -> Up transition above", "result": "Alerts received on Telegram bot for both state changes" + }, + { + "test": "Custom status page", + "method": "Ran nginx:alpine container locally on port 8080 serving the custom HTML page", + "result": "Page loaded correctly, fetched live data from Uptime Kuma API, displayed correct uptime percentages (99.93% for test app, 97.06% for test uptime kuma) and color-coded heartbeat bars" } ] }