1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/bookstack_ynh.git synced 2024-09-03 18:16:02 +02:00
* Upgrade to version 21.04
This commit is contained in:
Éric Gaspar 2021-04-14 12:45:50 +02:00 committed by GitHub
parent 191efbae22
commit 78c6863a6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 49 additions and 62 deletions

View file

@ -13,7 +13,7 @@ BookStack is a simple, self-hosted, easy-to-use platform for organising and stor
BookStack is built using PHP, on top of the Laravel framework and it uses MySQL to store data. BookStack is built using PHP, on top of the Laravel framework and it uses MySQL to store data.
**Shipped version:** 0.31.7 **Shipped version:** 21.04
## Screenshots ## Screenshots
@ -32,7 +32,7 @@ For the first time Login, use the default credentials `admin@admin.com` and `pas
## Documentation ## Documentation
* Official documentation: https://www.bookstackapp.com/docs/ * Official documentation: https://www.bookstackapp.com/docs/
* YunoHost documentation: https://yunohost.org/#/app_bookstack * YunoHost documentation: https://yunohost.org/en/app_bookstack
## YunoHost specific features ## YunoHost specific features
@ -43,8 +43,8 @@ For the first time Login, use the default credentials `admin@admin.com` and `pas
#### Supported architectures #### Supported architectures
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/bookstack%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/bookstack/) * x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/bookstack.svg)](https://ci-apps.yunohost.org/ci/apps/bookstack/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/bookstack%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/bookstack/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/bookstack.svg)](https://ci-apps-arm.yunohost.org/ci/apps/bookstack/)
## Limitations ## Limitations

View file

@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install
## Overview ## Overview
BookStack est une plate-forme simple, auto-hébergée et facile à utiliser pour organiser et stocker des informations. BookStack est une plate-forme simple, auto-hébergée et facile à utiliser pour organiser et stocker des informations.
**Version incluse :** 0.31.7 **Version incluse :** 21.04
## Screenshots ## Screenshots
@ -30,7 +30,7 @@ Login using the default admin details `admin@admin.com` with a password of `pass
## Documentation ## Documentation
* Documentation officielle : https://www.bookstackapp.com/docs/ * Documentation officielle : https://www.bookstackapp.com/docs/
* Documentation YunoHost : https://yunohost.org/#/app_bookstack_fr * Documentation YunoHost : https://yunohost.org/fr/app_bookstack
## Caractéristiques spécifiques YunoHost ## Caractéristiques spécifiques YunoHost
@ -41,8 +41,8 @@ Login using the default admin details `admin@admin.com` with a password of `pass
#### Architectures supportées #### Architectures supportées
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/bookstack%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/bookstack/) * x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/bookstack.svg)](https://ci-apps.yunohost.org/ci/apps/bookstack/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/bookstack%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/bookstack/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/bookstack.svg)](https://ci-apps-arm.yunohost.org/ci/apps/bookstack/)
## Limitations ## Limitations

View file

@ -17,8 +17,7 @@
upgrade=1 upgrade=1
upgrade=1 from_commit=a1db7396ceab19640e68d6a8cc05befd1f9c07ad upgrade=1 from_commit=a1db7396ceab19640e68d6a8cc05befd1f9c07ad
backup_restore=1 backup_restore=1
multi_instance=1 multi_instance=0
port_already_use=0
change_url=0 change_url=0
;;; Options ;;; Options
Email= Email=
@ -27,4 +26,3 @@ Notification=none
; commit=a1db7396ceab19640e68d6a8cc05befd1f9c07ad ; commit=a1db7396ceab19640e68d6a8cc05befd1f9c07ad
name=Testing (#11) name=Testing (#11)
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666&

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/BookStackApp/BookStack/archive/v0.31.7.tar.gz SOURCE_URL=https://github.com/BookStackApp/BookStack/archive/refs/tags/v21.04.tar.gz
SOURCE_SUM=6c832378ec245a8af282c11643c8f1fe9b1786eb8cabcae2f2ef30aa08844db0 SOURCE_SUM=b0a9b8229a1983e0e8349f7ab63bfa4ea86c2a28de2f6c46463e5547e1077646
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true

View file

@ -6,7 +6,7 @@
"en": "Platform to create documentation/wiki content", "en": "Platform to create documentation/wiki content",
"fr": "Plateforme pour créer du contenu de documentation/wiki " "fr": "Plateforme pour créer du contenu de documentation/wiki "
}, },
"version": "0.31.7~ynh1", "version": "21.04~ynh1",
"url": "https://www.bookstackapp.com/", "url": "https://www.bookstackapp.com/",
"license": "MIT", "license": "MIT",
"maintainer": { "maintainer": {
@ -14,9 +14,9 @@
"email": "liberodark@gmail.com" "email": "liberodark@gmail.com"
}, },
"requirements": { "requirements": {
"yunohost": ">= 4.1.0" "yunohost": ">= 4.1.7"
}, },
"multi_instance": true, "multi_instance": false,
"services": [ "services": [
"nginx", "nginx",
"php7.3-fpm", "php7.3-fpm",
@ -26,19 +26,11 @@
"install": [{ "install": [{
"name": "domain", "name": "domain",
"type": "domain", "type": "domain",
"ask": {
"en": "Choose a domain name for BookStack",
"fr": "Choisissez un nom de domaine pour BookStack"
},
"example": "example.com" "example": "example.com"
}, },
{ {
"name": "path", "name": "path",
"type": "path", "type": "path",
"ask": {
"en": "Choose a path for BookStack",
"fr": "Choisissez un chemin pour BookStack"
},
"example": "/bookstack", "example": "/bookstack",
"default": "/bookstack" "default": "/bookstack"
}, },
@ -55,10 +47,6 @@
{ {
"name": "is_public", "name": "is_public",
"type": "boolean", "type": "boolean",
"ask": {
"en": "Is it a public site?",
"fr": "Est-ce un site public ?"
},
"help": { "help": {
"en": "If enabled, BookStack will be accessible by people who do not have an account. This can be changed later via the webadmin.", "en": "If enabled, BookStack will be accessible by people who do not have an account. This can be changed later via the webadmin.",
"fr": "Si cette case est cochée, BookStack sera accessible aux personnes nayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." "fr": "Si cette case est cochée, BookStack sera accessible aux personnes nayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."

View file

@ -100,16 +100,13 @@ fi
# MODIFY A CONFIG FILE # MODIFY A CONFIG FILE
#================================================= #=================================================
cp -a ../conf/.env.example $final_path/.env path_url="$new_path"
domain="$new_domain"
mail_pwd=$(ynh_string_random --length=12)
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/.env" ynh_add_config --template=../conf/.env.example --destination=$final_path/.env
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/.env"
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$new_domain" --target_file="$final_path/.env"
ynh_replace_string --match_string="__PATH__" --replace_string="$new_path" --target_file="$final_path/.env"
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/.env"
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/.env"
ynh_store_file_checksum $final_path/.env chmod 600 $final_path/.env
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX

View file

@ -57,6 +57,14 @@ db_user=$db_name
ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_app_setting_set --app=$app --key=db_name --value=$db_name
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..." --weight=2
# Create a system user
ynh_system_user_create --username=$app --home_dir=$final_path
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
@ -74,14 +82,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=2
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..." --weight=2
# Create a system user
ynh_system_user_create --username=$app
#================================================= #=================================================
# PHP-FPM CONFIGURATION # PHP-FPM CONFIGURATION
#================================================= #=================================================
@ -106,8 +106,6 @@ ynh_install_composer --phpversion=$phpversion --workdir=$final_path --install_ar
mail_pwd=$(ynh_string_random --length=12) mail_pwd=$(ynh_string_random --length=12)
ynh_add_config --template=../conf/.env.example --destination=$final_path/.env ynh_add_config --template=../conf/.env.example --destination=$final_path/.env
ynh_store_file_checksum $final_path/.env
#================================================= #=================================================
# FINAL BOOKSTACK INSTALL # FINAL BOOKSTACK INSTALL
#================================================= #=================================================
@ -128,6 +126,8 @@ popd
chown -R $app: $final_path chown -R $app: $final_path
chmod -R 755 $final_path chmod -R 755 $final_path
chmod 600 $final_path/.env
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT
#================================================= #=================================================

View file

@ -47,20 +47,20 @@ test ! -d $final_path \
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Restoring the app main directory..." --weight=1
ynh_restore_file --origin_path="$final_path"
#================================================= #=================================================
# RECREATE THE DEDICATED USER # RECREATE THE DEDICATED USER
#================================================= #=================================================
ynh_script_progression --message="Recreating the dedicated system user..." --weight=3 ynh_script_progression --message="Recreating the dedicated system user..." --weight=3
# Create the dedicated user (if not existing) # Create the dedicated user (if not existing)
ynh_system_user_create --username=$app ynh_system_user_create --username=$app --home_dir=$final_path
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Restoring the app main directory..." --weight=1
ynh_restore_file --origin_path="$final_path"
#================================================= #=================================================
# RESTORE USER RIGHTS # RESTORE USER RIGHTS
@ -70,6 +70,8 @@ ynh_system_user_create --username=$app
chown -R $app: $final_path chown -R $app: $final_path
chmod -R 755 $final_path chmod -R 755 $final_path
chmod 600 $final_path/.env
#================================================= #=================================================
# RESTORE THE PHP-FPM CONFIGURATION # RESTORE THE PHP-FPM CONFIGURATION
#================================================= #=================================================

View file

@ -45,6 +45,14 @@ ynh_clean_setup () {
# Exit if an error occurs during the execution of the script # Exit if an error occurs during the execution of the script
ynh_abort_if_errors ynh_abort_if_errors
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=2
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir=$final_path
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
@ -80,14 +88,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=2
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app
#================================================= #=================================================
# PHP-FPM CONFIGURATION # PHP-FPM CONFIGURATION
#================================================= #=================================================
@ -125,6 +125,8 @@ popd
chown -R $app: $final_path chown -R $app: $final_path
chmod -R 755 $final_path chmod -R 755 $final_path
chmod 600 $final_path/.env
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================