From 6f12aa7a5d5a852d00557448e1d628d705fe0141 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 1 Dec 2025 18:26:30 +0100 Subject: [PATCH] Bump Baikal to deb13 (#9544) Bump default OS version to Debian 13 and PHP to 8.3 in Baikal install scripts and config. Add curl to PHP modules. Refactor PostgreSQL database setup to use new variable names and helper function for credentials. --- ct/baikal.sh | 5 +++-- frontend/public/json/baikal.json | 2 +- install/baikal-install.sh | 27 +++++++++------------------ 3 files changed, 13 insertions(+), 21 deletions(-) diff --git a/ct/baikal.sh b/ct/baikal.sh index 0d4364e1fe..b67c12fd55 100644 --- a/ct/baikal.sh +++ b/ct/baikal.sh @@ -11,7 +11,7 @@ var_cpu="${var_cpu:-1}" var_ram="${var_ram:-512}" var_disk="${var_disk:-4}" var_os="${var_os:-debian}" -var_version="${var_version:-12}" +var_version="${var_version:-13}" var_unprivileged="${var_unprivileged:-1}" header_info "$APP" @@ -37,8 +37,9 @@ function update_script() { mv /opt/baikal /opt/baikal-backup msg_ok "Backed up data" - fetch_and_deploy_gh_release "baikal" "sabre-io/Baikal" + PHP_APACHE="YES" PHP_MODULE="pgsql,curl" PHP_VERSION="8.3" setup_php setup_composer + fetch_and_deploy_gh_release "baikal" "sabre-io/Baikal" msg_info "Configuring Baikal" cp -r /opt/baikal-backup/config/baikal.yaml /opt/baikal/config/ diff --git a/frontend/public/json/baikal.json b/frontend/public/json/baikal.json index 39c230d321..94d4fda2e2 100644 --- a/frontend/public/json/baikal.json +++ b/frontend/public/json/baikal.json @@ -23,7 +23,7 @@ "ram": 512, "hdd": 4, "os": "debian", - "version": "12" + "version": "13" } } ], diff --git a/install/baikal-install.sh b/install/baikal-install.sh index 5d80786799..05a6dfa7c6 100644 --- a/install/baikal-install.sh +++ b/install/baikal-install.sh @@ -13,24 +13,15 @@ setting_up_container network_check update_os +msg_info "Installing Dependencies" +$STD apt install -y git +msg_ok "Installed Dependencies" + PG_VERSION="16" setup_postgresql -PHP_APACHE="YES" PHP_MODULE="pgsql" PHP_VERSION="8.2" setup_php +PHP_APACHE="YES" PHP_MODULE="pgsql,curl" PHP_VERSION="8.3" setup_php setup_composer fetch_and_deploy_gh_release "baikal" "sabre-io/Baikal" - -msg_info "Setting up PostgreSQL Database" -DB_NAME=baikal -DB_USER=baikal -DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13) -$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" -$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" -{ - echo "Baikal Credentials" - echo "Baikal Database User: $DB_USER" - echo "Baikal Database Password: $DB_PASS" - echo "Baikal Database Name: $DB_NAME" -} >>~/baikal.creds -msg_ok "Set up PostgreSQL Database" +PG_DB_NAME="baikal_db" PG_DB_USER="baikal_user" PG_DB_PASS="$(openssl rand -base64 12)" setup_postgresql_db msg_info "Configuring Baikal" cd /opt/baikal @@ -39,9 +30,9 @@ cat </opt/baikal/config/baikal.yaml database: backend: pgsql pgsql_host: localhost - pgsql_dbname: $DB_NAME - pgsql_username: $DB_USER - pgsql_password: $DB_PASS + pgsql_dbname: $PG_DB_NAME + pgsql_username: $PG_DB_USER + pgsql_password: $PG_DB_PASS EOF chown -R www-data:www-data /opt/baikal/ chmod -R 755 /opt/baikal/