mirror of
https://github.com/YunoHost-Apps/nodebb_ynh.git
synced 2024-09-03 19:46:29 +02:00
Set upgrade
This commit is contained in:
parent
f11ba8bc80
commit
795dc7d0a7
3 changed files with 9 additions and 13 deletions
|
@ -10,7 +10,7 @@ Group=__APP__
|
||||||
|
|
||||||
Environment=NODE_ENV=production
|
Environment=NODE_ENV=production
|
||||||
WorkingDirectory=__FINALPATH__/
|
WorkingDirectory=__FINALPATH__/
|
||||||
PIDFile=__FINALPATH__/pidfile
|
#PIDFile=__FINALPATH__/pidfile
|
||||||
Environment="__YNH_NODE_LOAD_PATH__"
|
Environment="__YNH_NODE_LOAD_PATH__"
|
||||||
ExecStart=__YNH_NODE__ __FINALPATH__/nodebb start
|
ExecStart=__YNH_NODE__ __FINALPATH__/nodebb start
|
||||||
#loader.js
|
#loader.js
|
||||||
|
|
|
@ -6,9 +6,7 @@
|
||||||
|
|
||||||
# dependencies used by the app
|
# dependencies used by the app
|
||||||
pkg_dependencies="postgresql"
|
pkg_dependencies="postgresql"
|
||||||
|
|
||||||
nodejs_version=14
|
nodejs_version=14
|
||||||
|
|
||||||
nodebb_version=v1.18.x
|
nodebb_version=v1.18.x
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -83,8 +83,14 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
pushd $final_path
|
||||||
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config.json"
|
# Shut down your forum
|
||||||
|
./nodebb stop
|
||||||
|
# Grab the latest and greatest code
|
||||||
|
git fetch # Grab the latest code from the NodeBB Repository
|
||||||
|
git reset --hard origin/$nodebb_version # Replace v1.12.x with the branch name!
|
||||||
|
# Run the NodeBB upgrade script
|
||||||
|
./nodebb upgrade
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
|
@ -108,14 +114,6 @@ ynh_install_app_dependencies $pkg_dependencies
|
||||||
# Install Nodejs
|
# Install Nodejs
|
||||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# UPDATE NODEBB
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
pushd $final_path
|
|
||||||
ynh_exec_as $app env $ynh_node_load_PATH $final_path/nodebb upgrade
|
|
||||||
popd
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SYSTEMD
|
# SETUP SYSTEMD
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue