1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nodebb_ynh.git synced 2024-09-03 19:46:29 +02:00

Merge pull request #21 from YunoHost-Apps/testing

Testing
This commit is contained in:
Éric Gaspar 2021-09-23 08:48:43 +02:00 committed by GitHub
commit db07cc3654
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 26 additions and 31 deletions

View file

@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
NodeBB is built using the Node.js server-side Javascript platform, delivering unmatched performance.
Building on this high performance platform means fast and dependable performance that will support even the biggest and most active community.
**Shipped version:** 1.18.0~ynh1
**Shipped version:** 1.18.3~ynh1
**Demo:** https://try.nodebb.org

View file

@ -14,7 +14,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
NodeBB is built using the Node.js server-side Javascript platform, delivering unmatched performance.
Building on this high performance platform means fast and dependable performance that will support even the biggest and most active community.
**Version incluse :** 1.18.0~ynh1
**Version incluse :** 1.18.3~ynh1
**Démo :** https://try.nodebb.org

View file

@ -5,7 +5,7 @@
admin="john"
language="fr"
is_public=1
password="password"
password="password123456"
; Checks
pkg_linter=1
setup_sub_dir=1

View file

@ -3,10 +3,7 @@
"secret": "__SECRET__",
"database": "postgres",
"port": "__PORT__",
"admin:username": "__ADMIN__",
"admin:password": "__PASSWORD__",
"admin:password:confirm": "__PASSWORD__",
"admin:email": "admin@__DOMAIN__",
"bind_address": "127.0.0.1",
"postgres": {
"host": "localhost",
"port": "5432",

View file

@ -6,7 +6,7 @@
"en": "Forum software built for the modern web",
"fr": "Logiciel de forum conçu pour le Web moderne"
},
"version": "1.18.0~ynh1",
"version": "1.18.3~ynh1",
"url": "https://nodebb.org",
"upstream": {
"license": "GPL-3.0",
@ -32,8 +32,7 @@
"install" : [
{
"name": "domain",
"type": "domain",
"example": "example.com"
"type": "domain"
},
{
"name": "path",
@ -43,8 +42,7 @@
},
{
"name": "admin",
"type": "user",
"example": "johndoe"
"type": "user"
},
{
"name": "is_public",
@ -53,8 +51,7 @@
},
{
"name": "password",
"type": "password",
"example": "Choose a password"
"type": "password"
}
]
}

View file

@ -99,10 +99,10 @@ ynh_psql_setup_db --db_user=$db_name --db_name=$db_name
# Créer le dossier de log
mkdir -p /var/log/$app
touch /var/log/$app/$app.log
install_log=/var/log/$app/installation.log
touch $install_log
#install_log=/var/log/$app/installation.log
#touch $install_log
chown $app -R /var/log/$app
chown admin -R $install_log
#chown admin -R $install_log
# Configuration de logrotate
ynh_use_logrotate
@ -123,25 +123,25 @@ chown -R $app:www-data "$final_path"
#=================================================
# CONFIGURE NODEBB
#=================================================
ynh_script_progression --message="Configuring the $app..." --weight=2
ynh_add_config --template="../conf/config.json" --destination="$final_path/config.json"
setup="{
\"url\": \"https://${domain}${path_url}\",
\"admin:username\": \"${admin}\",
\"admin:password\": \"${password}\",
\"admin:password:confirm\": \"${password}\",
\"admin:email\": \"admin@${domain}\",
\"database\": \"postgres\",
\"postgres:host\": \"localhost\",
\"postgres:port\": \"5432\",
\"postgres:username\": \"$db_name\",
\"postgres:password\": \"$db_pwd\",
\"postgres:database\": \"$db_name\"
\"admin:username\": \"$admin\",
\"admin:password\": \"$password\",
\"admin:password:confirm\": \"$password\",
\"admin:email\": \"admin@$domain\"
}"
pushd $final_path
ynh_exec_as $app env $ynh_node_load_PATH $final_path/nodebb setup "${setup}" | tee -a $install_log
ynh_use_nodejs
ynh_exec_as $app env $ynh_node_load_PATH $final_path/nodebb setup "${setup}" 2>/dev/null
popd
chmod 400 "$final_path/config.json"
chown $app:$app "$final_path/config.json"
#=================================================
# NGINX CONFIGURATION
#=================================================

View file

@ -84,13 +84,14 @@ then
ynh_script_progression --message="Upgrading source files..." --weight=1
pushd $final_path
ynh_use_nodejs
# Shut down your forum
./nodebb stop
ynh_exec_as $app env "$ynh_node_load_PATH" $final_path/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
ynh_exec_as $app $ynh_node_load_PATH $final_path/nodebb upgrade 2>/dev/null
popd
fi