---
This commit is contained in:
parent
67832266fc
commit
1746c163a5
@ -26,15 +26,15 @@ $STD apt-get install -y \
|
|||||||
libpng-dev \
|
libpng-dev \
|
||||||
libjpeg62-turbo-dev \
|
libjpeg62-turbo-dev \
|
||||||
libpq-dev \
|
libpq-dev \
|
||||||
libwebp-dev \
|
libwebp-dev
|
||||||
composer
|
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PG_VERSION="16" install_postgresql
|
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
|
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
|
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_NAME=koel_db
|
||||||
DB_USER=koel
|
DB_USER=koel
|
||||||
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
|
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 Password: $DB_PASS"
|
||||||
echo "Koel Database Name: $DB_NAME"
|
echo "Koel Database Name: $DB_NAME"
|
||||||
} >>~/koel.creds
|
} >>~/koel.creds
|
||||||
msg_ok "Set up PostgreSQL database"
|
msg_ok "Set up PostgreSQL Database"
|
||||||
|
|
||||||
msg_info "Installing Koel(Patience)"
|
msg_info "Installing Koel(Patience)"
|
||||||
RELEASE=$(curl -fsSL https://github.com/koel/koel/releases/latest | grep "title>Release" | cut -d " " -f 4)
|
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
|
curl -fsSL https://github.com/koel/koel/releases/download/${RELEASE}/koel-${RELEASE}.zip -o /opt/koel-${RELEASE}.zip
|
||||||
unzip -q /opt/koel-${RELEASE}.zip
|
unzip -q /opt/koel-${RELEASE}.zip
|
||||||
cd /opt/koel
|
cd /opt/koel
|
||||||
$STD apt-get install composer -y
|
#$STD apt-get install composer -y
|
||||||
mv .env.example .env
|
mv .env.example .env
|
||||||
$STD composer install --no-interaction
|
$STD composer install --no-interaction
|
||||||
sed -i -e "s/DB_CONNECTION=.*/DB_CONNECTION=pgsql/" \
|
sed -i -e "s/DB_CONNECTION=.*/DB_CONNECTION=pgsql/" \
|
||||||
|
@ -279,7 +279,7 @@ install_php() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$CURRENT_PHP" != "$PHP_VERSION" ]]; then
|
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
|
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 curl -fsSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
|
||||||
$STD dpkg -i /tmp/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
|
for ini in "${PHP_INI_PATHS[@]}"; do
|
||||||
if [[ -f "$ini" ]]; then
|
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|^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|^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|^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"
|
sed -i "s|^max_execution_time = .*|max_execution_time = ${PHP_MAX_EXECUTION_TIME}|" "$ini"
|
||||||
msg_ok "Patched $ini"
|
$STD msg_ok "Patched $ini"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@ -349,7 +349,7 @@ install_composer() {
|
|||||||
CURRENT_VERSION=$("$COMPOSER_BIN" --version | awk '{print $3}')
|
CURRENT_VERSION=$("$COMPOSER_BIN" --version | awk '{print $3}')
|
||||||
msg_info "Composer $CURRENT_VERSION found, updating to latest"
|
msg_info "Composer $CURRENT_VERSION found, updating to latest"
|
||||||
else
|
else
|
||||||
msg_info "Composer not found, installing latest version"
|
msg_info "Setup Composer"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Download and install latest composer
|
# Download and install latest composer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user