mirror of
https://github.com/YunoHost-Apps/owntracks_ynh.git
synced 2024-09-03 19:56:24 +02:00
v2
This commit is contained in:
parent
b5b12f66fa
commit
4be80c7f5c
5 changed files with 29 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$_config['sql_host'] = 'localhost';
|
$_config['sql_host'] = 'localhost';
|
||||||
$_config['sql_user'] = '__DB_NAME__';
|
$_config['sql_user'] = '__DB_USER__';
|
||||||
$_config['sql_pass'] = '__DB_PWD__';
|
$_config['sql_pass'] = '__DB_PWD__';
|
||||||
$_config['sql_db'] = '__DB_NAME__';
|
$_config['sql_db'] = '__DB_NAME__';
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,9 @@ ram.runtime = "50M"
|
||||||
|
|
||||||
[resources.apt]
|
[resources.apt]
|
||||||
packages = "mariadb-server, php8.2-fpm, php8.2-mysql"
|
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]
|
[resources.database]
|
||||||
type = "mysql"
|
type = "mysql"
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
# COMMON VARIABLES
|
# COMMON VARIABLES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
nodejs_version=20
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PERSONAL HELPERS
|
# PERSONAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -9,6 +9,14 @@
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
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
|
# 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"
|
chmod 400 "$install_dir/config.inc.php"
|
||||||
chown $app:$app "$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
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -20,6 +20,9 @@ ynh_remove_nginx_config
|
||||||
# Remove the dedicated php-fpm config
|
# Remove the dedicated php-fpm config
|
||||||
ynh_remove_fpm_config
|
ynh_remove_fpm_config
|
||||||
|
|
||||||
|
# Remove NodeJS
|
||||||
|
ynh_remove_nodejs
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue