Skip to content

Commit 6f12aa7

Browse files
authored
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.
1 parent ec182ae commit 6f12aa7

File tree

3 files changed

+13
-21
lines changed

3 files changed

+13
-21
lines changed

ct/baikal.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-1}"
1111
var_ram="${var_ram:-512}"
1212
var_disk="${var_disk:-4}"
1313
var_os="${var_os:-debian}"
14-
var_version="${var_version:-12}"
14+
var_version="${var_version:-13}"
1515
var_unprivileged="${var_unprivileged:-1}"
1616

1717
header_info "$APP"
@@ -37,8 +37,9 @@ function update_script() {
3737
mv /opt/baikal /opt/baikal-backup
3838
msg_ok "Backed up data"
3939

40-
fetch_and_deploy_gh_release "baikal" "sabre-io/Baikal"
40+
PHP_APACHE="YES" PHP_MODULE="pgsql,curl" PHP_VERSION="8.3" setup_php
4141
setup_composer
42+
fetch_and_deploy_gh_release "baikal" "sabre-io/Baikal"
4243

4344
msg_info "Configuring Baikal"
4445
cp -r /opt/baikal-backup/config/baikal.yaml /opt/baikal/config/

frontend/public/json/baikal.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"ram": 512,
2424
"hdd": 4,
2525
"os": "debian",
26-
"version": "12"
26+
"version": "13"
2727
}
2828
}
2929
],

install/baikal-install.sh

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,15 @@ setting_up_container
1313
network_check
1414
update_os
1515

16+
msg_info "Installing Dependencies"
17+
$STD apt install -y git
18+
msg_ok "Installed Dependencies"
19+
1620
PG_VERSION="16" setup_postgresql
17-
PHP_APACHE="YES" PHP_MODULE="pgsql" PHP_VERSION="8.2" setup_php
21+
PHP_APACHE="YES" PHP_MODULE="pgsql,curl" PHP_VERSION="8.3" setup_php
1822
setup_composer
1923
fetch_and_deploy_gh_release "baikal" "sabre-io/Baikal"
20-
21-
msg_info "Setting up PostgreSQL Database"
22-
DB_NAME=baikal
23-
DB_USER=baikal
24-
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
25-
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
26-
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;"
27-
{
28-
echo "Baikal Credentials"
29-
echo "Baikal Database User: $DB_USER"
30-
echo "Baikal Database Password: $DB_PASS"
31-
echo "Baikal Database Name: $DB_NAME"
32-
} >>~/baikal.creds
33-
msg_ok "Set up PostgreSQL Database"
24+
PG_DB_NAME="baikal_db" PG_DB_USER="baikal_user" PG_DB_PASS="$(openssl rand -base64 12)" setup_postgresql_db
3425

3526
msg_info "Configuring Baikal"
3627
cd /opt/baikal
@@ -39,9 +30,9 @@ cat <<EOF >/opt/baikal/config/baikal.yaml
3930
database:
4031
backend: pgsql
4132
pgsql_host: localhost
42-
pgsql_dbname: $DB_NAME
43-
pgsql_username: $DB_USER
44-
pgsql_password: $DB_PASS
33+
pgsql_dbname: $PG_DB_NAME
34+
pgsql_username: $PG_DB_USER
35+
pgsql_password: $PG_DB_PASS
4536
EOF
4637
chown -R www-data:www-data /opt/baikal/
4738
chmod -R 755 /opt/baikal/

0 commit comments

Comments
 (0)