feat: add verify-deploy, check-env, and db-optimize helper scripts
CI / check (push) Successful in 4m13s
CI / deploy (push) Successful in 19s
CI / publish-container (push) Successful in 1m19s

This commit is contained in:
openhands committed 2026-09-13 21:12:50 +02:00
1 parent 7840f44e5e
commit f2b64bc83a
3 files changed
+44

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Optimize all tables in mariadb-turbo
cd "$(dirname "$0")/.."
[ -f .env ] && source .env
DB_USER=${MARIADB_USER:-cms}
DB_PASS=${MARIADB_PASSWORD:-cms}
DB_NAME=${MARIADB_DATABASE:-habbo}
echo "Optimizing database tables..."
# Get all tables
tables=$(docker compose exec -T mariadb-turbo mariadb -u"$DB_USER" -p"$DB_PASS" "$DB_NAME" -e "SHOW TABLES" -s)
# Optimize them
for table in $tables; do
echo "Optimizing $table..."
docker compose exec -T mariadb-turbo mariadb -u"$DB_USER" -p"$DB_PASS" "$DB_NAME" -e "OPTIMIZE TABLE $table"
done
echo "Optimization complete."