From 117615bb29387e17b97fce8bb788ad29acd69622 Mon Sep 17 00:00:00 2001 From: MickLesk Date: Sun, 5 Apr 2026 19:23:16 +0200 Subject: [PATCH] revert(fleet): switch back to MySQL, MariaDB incompatible with Fleet migrations MariaDB fails on migration 20240905200000_UninstallPackages due to SQL syntax incompatibility (MODIFY COLUMN ... NULL). Use real MySQL with manual DB setup instead of setup_mariadb_db. --- install/fleet-install.sh | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/install/fleet-install.sh b/install/fleet-install.sh index 6c44a419..9a9543f4 100644 --- a/install/fleet-install.sh +++ b/install/fleet-install.sh @@ -13,8 +13,17 @@ setting_up_container network_check update_os -setup_mariadb -MARIADB_DB_NAME="fleet" MARIADB_DB_USER="fleet" setup_mariadb_db +setup_mysql + +msg_info "Setting up Database" +FLEET_DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c 13) +$STD mysql -u root </opt/fleet/.env FLEET_MYSQL_ADDRESS=127.0.0.1:3306 FLEET_MYSQL_DATABASE=fleet FLEET_MYSQL_USERNAME=fleet -FLEET_MYSQL_PASSWORD=${MARIADB_DB_PASS} +FLEET_MYSQL_PASSWORD=${FLEET_DB_PASS} FLEET_SERVER_ADDRESS=0.0.0.0:8080 FLEET_SERVER_TLS=false FLEET_AUTH_JWT_KEY=${JWT_KEY} @@ -42,8 +51,8 @@ msg_info "Creating Service" cat </etc/systemd/system/fleet.service [Unit] Description=Fleet -After=network.target mariadb.service -Requires=mariadb.service +After=network.target mysql.service +Requires=mysql.service [Service] Type=simple