1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lingva_ynh.git synced 2024-09-03 19:36:20 +02:00

mulai nodejs sebelum penambahan konfigurasi

This commit is contained in:
Neko Nekowazarashi 2023-05-29 21:34:57 +07:00
parent e66ebaed5f
commit 50ce0ab75b
2 changed files with 11 additions and 2 deletions

View file

@ -9,6 +9,11 @@
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STARTING NODEJS
#=================================================
ynh_use_nodejs
#=================================================
# APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC)
@ -68,7 +73,6 @@ echo "module.exports = { basePath: '$next_path', };" >> "$install_dir/next.confi
ynh_script_progression --message="Building the app..." --weight=1
ynh_install_nodejs --nodejs_version=18.16.0
ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install --prefix="$install_dir"
npx next telemetry disable
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm run build --prefix="$install_dir"

View file

@ -81,6 +81,12 @@ fi
# ownership to all files such as after the ynh_setup_source step
chown -R $app:www-data "$install_dir"
#=================================================
# STARTING NODEJS
#=================================================
ynh_use_nodejs
#=================================================
# REAPPLY SYSTEM CONFIGURATIONS
#=================================================
@ -116,7 +122,6 @@ chown $app:$app "$install_dir/.env.local"
#=================================================
ynh_script_progression --message="Rebuilding the app..." --weight=1
ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install --prefix="$install_dir"
npx next telemetry disable
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm run build --prefix="$install_dir"