Kimai / Ghost / ManageMyDamnLife: Switch to MariaDB (#8712)

Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
This commit is contained in:
CanbiZ
2025-10-29 05:06:03 -07:00
committed by GitHub
parent 304de66ec1
commit b9404efc57
5 changed files with 36 additions and 82 deletions

View File

@@ -20,22 +20,22 @@ $STD apt-get install -y \
libjemalloc2
msg_ok "Installed Dependencies"
setup_mysql
setup_mariadb
msg_info "Configuring Database"
DB_NAME=ghost
DB_USER=ghostuser
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
$STD mysql -u root -e "CREATE DATABASE $DB_NAME;"
$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
$STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
$STD mariadb -u root -e "CREATE DATABASE $DB_NAME;"
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
$STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
{
echo "Ghost-Credentials"
echo "Ghost Database User: $DB_USER"
echo "Ghost Database Password: $DB_PASS"
echo "Ghost Database Name: $DB_NAME"
} >>~/ghost.creds
msg_ok "Configured MySQL"
msg_ok "Configured MariaDB"
NODE_VERSION="22" setup_nodejs
@@ -60,4 +60,5 @@ customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
$STD apt-get -y clean
msg_ok "Cleaned"