@@ -13,14 +13,8 @@ setting_up_container
1313network_check
1414update_os
1515
16- msg_info " Installing Dependencies"
17- $STD apt-get install -y \
18- apache2 \
19- libapache2-mod-php \
20- php-{bcmath,curl,dom,gd,gmp,iconv,intl,json,mbstring,mysqli,opcache,pdo-mysql,redis,tokenizer,xml,zip} \
21- composer
22- msg_ok " Installed Dependencies"
23-
16+ PHP_VERSION=" 8.2" PHP_APACHE=" YES" PHP_MODULE=" dom,gmp,iconv,mysqli,pdo-mysql,redis,tokenizer" setup_php
17+ setup_composer
2418setup_mariadb
2519NODE_VERSION=" 20" NODE_MODULE=" yarn@latest" setup_nodejs
2620
@@ -39,12 +33,9 @@ $STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUS
3933} >> ~/monica.creds
4034msg_ok " Set up MariaDB"
4135
42- msg_info " Installing monica"
43- RELEASE=$( curl -fsSL https://api.github.com/repos/monicahq/monica/releases/latest | grep " tag_name" | awk ' {print substr($2, 3, length($2)-4) }' )
44- cd /opt
45- curl -fsSL " https://github.com/monicahq/monica/releases/download/v${RELEASE} /monica-v${RELEASE} .tar.bz2" -o " monica-v${RELEASE} .tar.bz2"
46- tar -xjf " monica-v${RELEASE} .tar.bz2"
47- mv " /opt/monica-v${RELEASE} " /opt/monica
36+ fetch_and_deploy_gh_release " monica" " monicahq/monica" " prebuild" " latest" " /opt/monica" " monica-v*.tar.bz2"
37+
38+ msg_info " Configuring monica"
4839cd /opt/monica
4940cp /opt/monica/.env.example /opt/monica/.env
5041HASH_SALT=$( openssl rand -base64 32)
@@ -59,8 +50,7 @@ $STD php artisan key:generate
5950$STD php artisan setup:production --email=admin@helper-scripts.com --password=helper-scripts.com --force
6051chown -R www-data:www-data /opt/monica
6152chmod -R 775 /opt/monica/storage
62- echo " ${RELEASE} " > /opt/${APPLICATION} _version.txt
63- msg_ok " Installed monica"
53+ msg_ok " Configured monica"
6454
6555msg_info " Creating Service"
6656cat << EOF >/etc/apache2/sites-available/monica.conf
@@ -87,7 +77,6 @@ motd_ssh
8777customize
8878
8979msg_info " Cleaning up"
90- rm -rf " /opt/monica-v${RELEASE} .tar.bz2"
9180$STD apt-get -y autoremove
9281$STD apt-get -y autoclean
9382msg_ok " Cleaned"
0 commit comments