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

with yarn

This commit is contained in:
yalh76 2019-02-03 05:12:39 +01:00
parent 63daad70ea
commit 04f96a0dd2
6 changed files with 23 additions and 15 deletions

View file

@ -11,7 +11,7 @@ An open source, modern and powerful wiki app built on Node.js, Git and Markdown
**Wiki.js is still under development, all features not already implemented.** **Wiki.js is still under development, all features not already implemented.**
**Shipped version:** 2.0.0-beta.15 **Shipped version:** 2.0.0-beta
## Licence ## Licence

View file

@ -6,7 +6,7 @@
"en": "An open source, modern and powerful wiki app built on Node.js, Git and Markdown for YunoHost.", "en": "An open source, modern and powerful wiki app built on Node.js, Git and Markdown for YunoHost.",
"fr": "Un wiki moderne et open source propulsé Node.js, Git et Markdown pour YunoHost." "fr": "Un wiki moderne et open source propulsé Node.js, Git et Markdown pour YunoHost."
}, },
"version": "2.0.0-beta.15~ynh1", "version": "2.0.0-beta~ynh1",
"url": "https://wiki.js.org/", "url": "https://wiki.js.org/",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"maintainer": { "maintainer": {

View file

@ -97,9 +97,14 @@ ynh_app_setting_set $app port $port
### - As well as the section "REINSTALL DEPENDENCIES" in the restore script ### - As well as the section "REINSTALL DEPENDENCIES" in the restore script
### - And the section "UPGRADE DEPENDENCIES" in the upgrade script ### - And the section "UPGRADE DEPENDENCIES" in the upgrade script
ynh_install_app_dependencies redis-server postgresql postgresql-contrib
ynh_install_nodejs 10 ynh_install_nodejs 10
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn
#================================================= #=================================================
# CREATE A POSTGRESQL DATABASE # CREATE A POSTGRESQL DATABASE
#================================================= #=================================================
@ -134,7 +139,7 @@ ynh_app_setting_set $app final_path $final_path
git clone https://github.com/Requarks/wiki "$final_path" git clone https://github.com/Requarks/wiki "$final_path"
pushd $final_path pushd $final_path
git checkout 2.0.0-beta.15 git checkout
popd popd
#================================================= #=================================================
@ -188,11 +193,7 @@ chown -R "$app":"$app" "$final_path"
pushd $final_path pushd $final_path
ynh_use_nodejs ynh_use_nodejs
sudo -u $app env PATH=$PATH:$nodejs_path npm install "graphql@^0.13.0" --save --production sudo -u $app env PATH=$PATH:$nodejs_path yarn install
sudo -u $app env PATH=$PATH:$nodejs_path npm install "acorn@^6.0.0" --save --production
sudo -u $app env PATH=$PATH:$nodejs_path npm install "babel-core@>=6.0.20" --save --production
sudo -u $app env PATH=$PATH:$nodejs_path npm install --production
sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix
sudo -u $app env PATH=$PATH:$nodejs_path npm run build sudo -u $app env PATH=$PATH:$nodejs_path npm run build
popd popd

View file

@ -57,6 +57,7 @@ ynh_psql_remove_db "$db_name" "$db_name"
ynh_remove_app_dependencies ynh_remove_app_dependencies
ynh_use_nodejs ynh_use_nodejs
ynh_remove_nodejs ynh_remove_nodejs
rm -rf "/etc/apt/sources.list.d/yarn.list"
#================================================= #=================================================
# REMOVE APP MAIN DIR # REMOVE APP MAIN DIR

View file

@ -92,9 +92,13 @@ chown -R "$app":"$app" "$final_path"
#================================================= #=================================================
# Define and install dependencies # Define and install dependencies
ynh_install_app_dependencies redis-server postgresql postgresql-contrib
ynh_install_nodejs 10 ynh_install_nodejs 10
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn
#================================================= #=================================================
# RESTORE SYSTEMD # RESTORE SYSTEMD
#================================================= #=================================================

View file

@ -88,7 +88,7 @@ path_url=$(ynh_normalize_url_path $path_url)
pushd $final_path pushd $final_path
git pull git pull
git checkout 2.0.0-beta.15 git checkout
popd popd
#================================================= #=================================================
@ -102,9 +102,13 @@ ynh_add_nginx_config
# UPGRADE DEPENDENCIES # UPGRADE DEPENDENCIES
#================================================= #=================================================
ynh_install_app_dependencies redis-server postgresql postgresql-contrib
ynh_install_nodejs 10 ynh_install_nodejs 10
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
ynh_install_app_dependencies redis-server postgresql postgresql-contrib yarn
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
#================================================= #=================================================
@ -129,9 +133,7 @@ chown -R "$app":"$app" "$final_path"
pushd $final_path pushd $final_path
ynh_use_nodejs ynh_use_nodejs
sudo -u $app env PATH=$PATH:$nodejs_path npm update --production sudo -u $app env PATH=$PATH:$nodejs_path yarn install
sudo -u $app env PATH=$PATH:$nodejs_path npm install --production
sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix
sudo -u $app env PATH=$PATH:$nodejs_path npm run build sudo -u $app env PATH=$PATH:$nodejs_path npm run build
popd popd