Add favicon assets, update Nitro v3 script, and update logs

This commit is contained in:
openhands committed 2026-07-07 16:04:25 +02:00
1 parent 2f0233a0c0
commit 9a7b40eae6
5 files changed
+1828 -7

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+22 -7
View File
@@ -74,6 +74,21 @@ NOTIFY_FAILED=false
# ============================================================================= # =============================================================================
if [ -f "$SCRIPT_DIR/.env" ]; then set -a; . "$SCRIPT_DIR/.env"; set +a; fi if [ -f "$SCRIPT_DIR/.env" ]; then set -a; . "$SCRIPT_DIR/.env"; set +a; fi
# Parse DATABASE_URL as fallback for DB credentials (Next.js / Prisma style)
if [ -z "${NITRO_DB_NAME:-}" ] && [ -n "${DATABASE_URL:-}" ]; then
du="${DATABASE_URL#mysql://}"
cred="${du%%@*}"
hostpart="${du#*@}"
DB_USER="${cred%%:*}"
DB_PASS="${cred#*:}"
DB_HOST="${hostpart%%:*}"
portdb="${hostpart#*:}"
DB_PORT="${portdb%%/*}"
DB_NAME="${portdb#*/}"
DB_NAME="${DB_NAME%%\?*}"
DB_PASS=$(printf '%b' "${DB_PASS//%/\\x}" 2>/dev/null || echo "$DB_PASS")
fi
# ============================================================================= # =============================================================================
# CONFIG # CONFIG
# ============================================================================= # =============================================================================
@@ -81,11 +96,11 @@ LOG_DIR="${NITRO_LOG_DIR:-$SCRIPT_DIR/storage/logs}"
mkdir -p "$LOG_DIR" 2>/dev/null || true mkdir -p "$LOG_DIR" 2>/dev/null || true
LOG_FILE="$LOG_DIR/update-$(date +%Y%m%d-%H%M%S).log" LOG_FILE="$LOG_DIR/update-$(date +%Y%m%d-%H%M%S).log"
NOTIFY_URL="${NITRO_NOTIFY_URL:-}" NOTIFY_URL="${NITRO_NOTIFY_URL:-}"
DB_NAME="${NITRO_DB_NAME:-habbo}" DB_NAME="${NITRO_DB_NAME:-${DB_NAME:-habbo}}"
DB_HOST="${NITRO_DB_HOST:-127.0.0.1}" DB_HOST="${NITRO_DB_HOST:-${DB_HOST:-127.0.0.1}}"
DB_PORT="${NITRO_DB_PORT:-3306}" DB_PORT="${NITRO_DB_PORT:-${DB_PORT:-3306}}"
DB_USER="${NITRO_DB_USER:-root}" DB_USER="${NITRO_DB_USER:-${DB_USER:-root}}"
DB_PASS="${NITRO_DB_PASS:-}" DB_PASS="${NITRO_DB_PASS:-${DB_PASS:-}}"
EMULATOR_SERVICE="${NITRO_EMULATOR_SERVICE:-emulator}" EMULATOR_SERVICE="${NITRO_EMULATOR_SERVICE:-emulator}"
EMULATOR_DIR="${NITRO_EMULATOR_PATH:-/var/www/emulator}" EMULATOR_DIR="${NITRO_EMULATOR_PATH:-/var/www/emulator}"
SQL_DIR="${NITRO_SQL_DIR:-$EMULATOR_DIR/Database Updates}" SQL_DIR="${NITRO_SQL_DIR:-$EMULATOR_DIR/Database Updates}"
@@ -586,7 +601,7 @@ cmd_health() {
echo -e "\n ${C_BOLD}Services:${C_RESET}" echo -e "\n ${C_BOLD}Services:${C_RESET}"
checkw "MariaDB" systemctl is-active mariadb; checkw "Nginx" systemctl is-active nginx; checkw "Redis" systemctl is-active redis-server checkw "MariaDB" systemctl is-active mariadb; checkw "Nginx" systemctl is-active nginx; checkw "Redis" systemctl is-active redis-server
echo -e "\n ${C_BOLD}Application:${C_RESET}" echo -e "\n ${C_BOLD}Application:${C_RESET}"
checkw "artisan" test -f "$SCRIPT_DIR/artisan"; checkw ".env" test -f "$SCRIPT_DIR/.env" checkw "Next.js" test -f "$SCRIPT_DIR/next.config.js" -o -f "$SCRIPT_DIR/next.config.mjs" -o -f "$SCRIPT_DIR/next.config.ts"; checkw ".env" test -f "$SCRIPT_DIR/.env"
checkw "Site" timeout 5 curl -sf "${NITRO_SITE_URL:-}" 2>/dev/null checkw "Site" timeout 5 curl -sf "${NITRO_SITE_URL:-}" 2>/dev/null
echo -e "\n ${C_BOLD}Resources:${C_RESET}" echo -e "\n ${C_BOLD}Resources:${C_RESET}"
local ak=$(df --output=avail "$EMULATOR_DIR" 2>/dev/null | tail -1); local ag=$((ak/1024/1024)) local ak=$(df --output=avail "$EMULATOR_DIR" 2>/dev/null | tail -1); local ag=$((ak/1024/1024))
@@ -707,7 +722,7 @@ cmd_clean() {
echo -en "\n Select: "; local c; read -r c echo -en "\n Select: "; local c; read -r c
case "$c" in case "$c" in
1) yarn cache clean 2>/dev/null && ok "Yarn cleaned" ;; 1) yarn cache clean 2>/dev/null && ok "Yarn cleaned" ;;
2) cd "$SCRIPT_DIR" && php artisan cache:clear 2>/dev/null && php artisan config:clear 2>/dev/null && php artisan view:clear 2>/dev/null && ok "Laravel cleaned" ;; 2) cd "$SCRIPT_DIR" && rm -rf .next 2>/dev/null && ok "Next.js cache cleared" ;;
3) redis-cli FLUSHALL 2>/dev/null && ok "Redis flushed" || warn "Redis N/A" ;; 3) redis-cli FLUSHALL 2>/dev/null && ok "Redis flushed" || warn "Redis N/A" ;;
4) find "$EMULATOR_DIR" -name "*.log" -mtime +14 -exec rm -f {} \; 2>/dev/null; ok "Logs cleaned" ;; 4) find "$EMULATOR_DIR" -name "*.log" -mtime +14 -exec rm -f {} \; 2>/dev/null; ok "Logs cleaned" ;;
5) yarn cache clean 2>/dev/null; find "$EMULATOR_DIR" -name "*.log" -mtime +14 -exec rm -f {} \; 2>/dev/null; rm -rf /tmp/nitro-* 2>/dev/null; ok "Full cleanup" ;; 5) yarn cache clean 2>/dev/null; find "$EMULATOR_DIR" -name "*.log" -mtime +14 -exec rm -f {} \; 2>/dev/null; rm -rf /tmp/nitro-* 2>/dev/null; ok "Full cleanup" ;;