1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/owntracks_ynh.git synced 2024-09-03 19:56:24 +02:00
This commit is contained in:
Éric Gaspar 2023-10-17 09:28:59 +02:00 committed by Félix Piédallu
parent b5b12f66fa
commit 4be80c7f5c
5 changed files with 29 additions and 1 deletions

View file

@ -1,7 +1,7 @@
<?php
$_config['sql_host'] = 'localhost';
$_config['sql_user'] = '__DB_NAME__';
$_config['sql_user'] = '__DB_USER__';
$_config['sql_pass'] = '__DB_PWD__';
$_config['sql_db'] = '__DB_NAME__';

View file

@ -58,6 +58,9 @@ ram.runtime = "50M"
[resources.apt]
packages = "mariadb-server, php8.2-fpm, php8.2-mysql"
extras.yarn.repo = "deb https://dl.yarnpkg.com/debian/ stable main"
extras.yarn.key = "https://dl.yarnpkg.com/debian/pubkey.gpg"
extras.yarn.packages = "yarn"
[resources.database]
type = "mysql"

View file

@ -4,6 +4,8 @@
# COMMON VARIABLES
#=================================================
nodejs_version=20
#=================================================
# PERSONAL HELPERS
#=================================================

View file

@ -9,6 +9,14 @@
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# INSTALL DEPENDENCIES
#=================================================
ynh_script_progression --message="Installing dependencies..." --weight=7
# Install Nodejs
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
@ -50,6 +58,18 @@ ynh_add_config --template="../conf/config.inc.php" --destination="$install_dir/c
chmod 400 "$install_dir/config.inc.php"
chown $app:$app "$install_dir/config.inc.php"
#=================================================
# INSTALL THE LOUNGE
#=================================================
ynh_script_progression --message="Installing $app..." --weight=10
pushd $install_dir
ynh_use_nodejs
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_ENV=production yarn build
mv $install_dir/dist/ $install_dir
popd
#=================================================
# END OF SCRIPT
#=================================================

View file

@ -20,6 +20,9 @@ ynh_remove_nginx_config
# Remove the dedicated php-fpm config
ynh_remove_fpm_config
# Remove NodeJS
ynh_remove_nodejs
#=================================================
# END OF SCRIPT
#=================================================