This commit is contained in:
CanbiZ 2025-05-14 13:27:51 +02:00
parent 67832266fc
commit 1746c163a5
2 changed files with 9 additions and 9 deletions

View File

@ -26,15 +26,15 @@ $STD apt-get install -y \
libpng-dev \
libjpeg62-turbo-dev \
libpq-dev \
libwebp-dev \
composer
libwebp-dev
msg_ok "Installed Dependencies"
PG_VERSION="16" install_postgresql
PHP_VERSION=8.3 PHP_MODULE="bcmath,bz2,cli,exif,common,curl,fpm,gd,imagick,intl,mbstring,pgsql,sqlite3,xml,xmlrpc,zip" install_php
NODE_VERSION=22 NODE_MODULE="yarn,npm@latest" install_node_and_modules
install_composer
msg_info "Setting up PSql Database"
msg_info "Setting up PostgreSQL Database"
DB_NAME=koel_db
DB_USER=koel
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
@ -50,7 +50,7 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
echo "Koel Database Password: $DB_PASS"
echo "Koel Database Name: $DB_NAME"
} >>~/koel.creds
msg_ok "Set up PostgreSQL database"
msg_ok "Set up PostgreSQL Database"
msg_info "Installing Koel(Patience)"
RELEASE=$(curl -fsSL https://github.com/koel/koel/releases/latest | grep "title>Release" | cut -d " " -f 4)
@ -58,7 +58,7 @@ mkdir -p /opt/koel_{media,sync}
curl -fsSL https://github.com/koel/koel/releases/download/${RELEASE}/koel-${RELEASE}.zip -o /opt/koel-${RELEASE}.zip
unzip -q /opt/koel-${RELEASE}.zip
cd /opt/koel
$STD apt-get install composer -y
#$STD apt-get install composer -y
mv .env.example .env
$STD composer install --no-interaction
sed -i -e "s/DB_CONNECTION=.*/DB_CONNECTION=pgsql/" \

View File

@ -279,7 +279,7 @@ install_php() {
fi
if [[ "$CURRENT_PHP" != "$PHP_VERSION" ]]; then
$STD echo "PHP $CURRENT_PHP detected, migrating to PHP $PHP_VERSION"
$STD msg_info "PHP $CURRENT_PHP detected, migrating to PHP $PHP_VERSION"
if [[ ! -f /etc/apt/sources.list.d/php.list ]]; then
$STD curl -fsSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb
@ -329,12 +329,12 @@ install_php() {
for ini in "${PHP_INI_PATHS[@]}"; do
if [[ -f "$ini" ]]; then
msg_info "Patching $ini"
$STD msg_info "Patching $ini"
sed -i "s|^memory_limit = .*|memory_limit = ${PHP_MEMORY_LIMIT}|" "$ini"
sed -i "s|^upload_max_filesize = .*|upload_max_filesize = ${PHP_UPLOAD_MAX_FILESIZE}|" "$ini"
sed -i "s|^post_max_size = .*|post_max_size = ${PHP_POST_MAX_SIZE}|" "$ini"
sed -i "s|^max_execution_time = .*|max_execution_time = ${PHP_MAX_EXECUTION_TIME}|" "$ini"
msg_ok "Patched $ini"
$STD msg_ok "Patched $ini"
fi
done
}
@ -349,7 +349,7 @@ install_composer() {
CURRENT_VERSION=$("$COMPOSER_BIN" --version | awk '{print $3}')
msg_info "Composer $CURRENT_VERSION found, updating to latest"
else
msg_info "Composer not found, installing latest version"
msg_info "Setup Composer"
fi
# Download and install latest composer