This commit is contained in:
Slaviša Arežina 2025-08-15 12:56:46 +02:00 committed by GitHub
parent 032709e107
commit ee74400626
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 31 deletions

View file

@ -13,13 +13,9 @@ setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
libapache2-mod-php \
php8.2-{curl,mbstring,mysql,xml,zip,gd}
msg_ok "Installed Dependencies"
PHP_VERSION="8.3" PHP_MODULE="mysql" PHP_APACHE="YES" PHP_MAX_EXECUTION_TIME="600" setup_php
setup_mariadb
fetch_and_deploy_gh_release "wavelog" "wavelog/wavelog" "tarball"
msg_info "Setting up Database"
DB_NAME=wavelog
@ -36,22 +32,11 @@ $STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUS
} >>~/wavelog.creds
msg_ok "Set up database"
msg_info "Setting up PHP"
sed -i '/max_execution_time/s/= .*/= 600/' /etc/php/8.2/apache2/php.ini
sed -i '/memory_limit/s/= .*/= 256M/' /etc/php/8.2/apache2/php.ini
sed -i '/upload_max_filesize/s/= .*/= 8M/' /etc/php/8.2/apache2/php.ini
msg_ok "Set up PHP"
msg_info "Installing Wavelog"
RELEASE=$(curl -fsSL https://api.github.com/repos/wavelog/wavelog/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
curl -fsSL "https://github.com/wavelog/wavelog/archive/refs/tags/${RELEASE}.zip" -o "${RELEASE}.zip"
$STD unzip ${RELEASE}.zip
mv wavelog-${RELEASE}/ /opt/wavelog
msg_info "Configuring Wavelog"
chown -R www-data:www-data /opt/wavelog/
find /opt/wavelog/ -type d -exec chmod 755 {} \;
find /opt/wavelog/ -type f -exec chmod 664 {} \;
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed Wavelog"
msg_ok "Configured Wavelog"
msg_info "Creating Service"
cat <<EOF >/etc/apache2/sites-available/wavelog.conf
@ -78,7 +63,6 @@ motd_ssh
customize
msg_info "Cleaning up"
rm -f ${RELEASE}.zip
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"