@@ -14,13 +14,12 @@ network_check
1414update_os
1515
1616msg_info " Installing Dependencies"
17- $STD apt-get install -y \
18- apache2 \
19- libapache2-mod-php \
20- php-{pgsql,dom}
17+ $STD apt-get install -y apache2
2118msg_ok " Installed Dependencies"
2219
2320PG_VERSION=" 16" setup_postgresql
21+ PHP_APACHE=" YES" PHP_MODULE=" pgsql, dom" PHP_VERSION=" 8.2" setup_php
22+ fetch_and_deploy_gh_release " baikal" " sabre-io/Baikal"
2423
2524msg_info " Setting up PostgreSQL Database"
2625DB_NAME=baikal
@@ -36,11 +35,7 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMP
3635} >> ~/baikal.creds
3736msg_ok " Set up PostgreSQL Database"
3837
39- msg_info " Installing Baikal"
40- RELEASE=$( curl -fsSL https://api.github.com/repos/sabre-io/Baikal/releases/latest | grep " tag_name" | awk ' {print substr($2, 2, length($2)-3) }' )
41- cd /opt
42- curl -fsSL " https://github.com/sabre-io/baikal/releases/download/${RELEASE} /baikal-${RELEASE} .zip" -o " baikal-${RELEASE} .zip"
43- $STD unzip " baikal-${RELEASE} .zip"
38+ msg_info " Configuring Baikal"
4439cat << EOF >/opt/baikal/config/baikal.yaml
4540database:
4641 backend: pgsql
@@ -51,7 +46,6 @@ database:
5146EOF
5247chown -R www-data:www-data /opt/baikal/
5348chmod -R 755 /opt/baikal/
54- echo " ${RELEASE} " > /opt/${APPLICATION} _version.txt
5549msg_ok " Installed Baikal"
5650
5751msg_info " Creating Service"
@@ -90,7 +84,6 @@ motd_ssh
9084customize
9185
9286msg_info " Cleaning up"
93- rm -rf " /opt/baikal-${RELEASE} .zip"
9487$STD apt-get -y autoremove
9588$STD apt-get -y autoclean
9689msg_ok " Cleaned"
0 commit comments