Update container documentation to reflect disk space adjustments and Docker log management
Expand the root disk size from 35 GB to 50 GB and implement log size limits for Docker containers. Add details about the new monitoring dashboard for homelab services, including deployment instructions and access URL. Ensure clarity on log rotation policies and risks associated with disk space usage.
This commit is contained in:
35
scripts/dashboard/deploy-dashboard.sh
Normal file
35
scripts/dashboard/deploy-dashboard.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
# Деплой дашборда homelab на хост Proxmox
|
||||
# Запуск: с хоста Proxmox или ssh root@192.168.1.150 'bash -s' < scripts/dashboard/deploy-dashboard.sh
|
||||
# Или из репозитория: ./scripts/dashboard/deploy-dashboard.sh (копирует из текущей директории)
|
||||
|
||||
set -e
|
||||
|
||||
# REPO_ROOT: корень репозитория (содержит scripts/dashboard/)
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
REPO_ROOT="${REPO_ROOT:-$(cd "$SCRIPT_DIR/../.." && pwd)}"
|
||||
DASHBOARD_SRC="${REPO_ROOT}/scripts/dashboard"
|
||||
DEST="/root/scripts/dashboard"
|
||||
SYSTEMD_DEST="/etc/systemd/system"
|
||||
|
||||
log() { echo "[$(date -Iseconds)] $*"; }
|
||||
|
||||
log "Deploying homelab dashboard..."
|
||||
|
||||
mkdir -p "$DEST"
|
||||
if [ "$(realpath "$DASHBOARD_SRC")" != "$(realpath "$DEST")" ]; then
|
||||
cp -v "${DASHBOARD_SRC}/dashboard-exporter.py" "$DEST/"
|
||||
cp -v "${DASHBOARD_SRC}/dashboard-server.py" "$DEST/"
|
||||
cp -v "${DASHBOARD_SRC}/index.html" "$DEST/"
|
||||
fi
|
||||
chmod +x "${DEST}/dashboard-exporter.py" "${DEST}/dashboard-server.py"
|
||||
|
||||
if [ -f "${REPO_ROOT}/scripts/systemd/homelab-dashboard.service" ]; then
|
||||
cp -v "${REPO_ROOT}/scripts/systemd/homelab-dashboard.service" "$SYSTEMD_DEST/"
|
||||
fi
|
||||
systemctl daemon-reload
|
||||
systemctl enable homelab-dashboard.service
|
||||
systemctl restart homelab-dashboard.service
|
||||
|
||||
log "Dashboard deployed. URL: http://192.168.1.150:19998"
|
||||
log "Status: $(systemctl is-active homelab-dashboard.service)"
|
||||
Reference in New Issue
Block a user