@@ -13,29 +13,10 @@ setting_up_container
1313network_check
1414update_os
1515
16- msg_info " Installing Dependencies"
17- $STD apt-get install -y \
18- apache2 \
19- lsb-release
20- msg_ok " Installed Dependencies"
21-
2216NODE_VERSION=" 22" NODE_MODULE=" yarn@latest" setup_nodejs
2317PG_VERSION=" 16" setup_postgresql
24-
25- msg_info " Setup PHP8.4 Repository"
26- $STD curl -fsSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
27- $STD dpkg -i /tmp/debsuryorg-archive-keyring.deb
28- $STD sh -c ' echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
29- $STD apt-get update
30- msg_ok " Setup PHP8.4 Repository"
31-
32- msg_info " Setup PHP"
33- $STD apt-get install -y \
34- php8.4 \
35- php8.4-{apcu,ctype,curl,dom,fileinfo,gd,iconv,intl,mbstring,pgsql} \
36- libapache2-mod-php8.4 \
37- composer
38- msg_info " Setup PHP"
18+ PHP_VERSION=" 8.4" PHP_APACHE=" YES" PHP_MODULE=" apcu,ctype,dom,fileinfo,iconv,pgsql" setup_php
19+ setup_composer
3920
4021msg_info " Setting up PostgreSQL"
4122DB_NAME=koillection
@@ -51,12 +32,9 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMP
5132} >> ~/koillection.creds
5233msg_ok " Set up PostgreSQL"
5334
54- msg_info " Installing Koillection"
55- RELEASE=$( curl -fsSL https://api.github.com/repos/benjaminjonard/koillection/releases/latest | grep " tag_name" | awk ' {print substr($2, 2, length($2)-3) }' )
56- cd /opt
57- curl -fsSL " https://github.com/benjaminjonard/koillection/archive/refs/tags/${RELEASE} .zip" -o " /opt/${RELEASE} .zip"
58- $STD unzip " ${RELEASE} .zip"
59- mv " /opt/koillection-${RELEASE} " /opt/koillection
35+ fetch_and_deploy_gh_release " koillection" " benjaminjonard/koillection"
36+
37+ msg_info " Configuring Koillection"
6038cd /opt/koillection
6139cp /opt/koillection/.env /opt/koillection/.env.local
6240APP_SECRET=$( openssl rand -base64 32)
@@ -76,7 +54,7 @@ $STD yarn install
7654$STD yarn build
7755chown -R www-data:www-data /opt/koillection/public/uploads
7856echo " ${RELEASE} " > /opt/${APPLICATION} _version.txt
79- msg_ok " Installed Koillection"
57+ msg_ok " Configured Koillection"
8058
8159msg_info " Creating Service"
8260cat << EOF >/etc/apache2/sites-available/koillection.conf
@@ -107,7 +85,6 @@ motd_ssh
10785customize
10886
10987msg_info " Cleaning up"
110- rm -rf " /opt/${RELEASE} .zip"
11188$STD apt-get -y autoremove
11289$STD apt-get -y autoclean
11390msg_ok " Cleaned"
0 commit comments