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

Merge pull request #21 from YunoHost-Apps/testing

Testing
This commit is contained in:
eric_G 2024-05-30 21:10:13 +02:00 committed by GitHub
commit e207a739a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 37 additions and 44 deletions

View file

@ -19,7 +19,7 @@ It shall NOT be edited by hand.
Gancio provide an online agenda open to contributions, and federated with the fediverse using ActivityPub. Gancio provide an online agenda open to contributions, and federated with the fediverse using ActivityPub.
**Shipped version:** 1.15.5~ynh2 **Shipped version:** 1.16.2~ynh1
**Demo:** <https://demo.gancio.org/> **Demo:** <https://demo.gancio.org/>

View file

@ -19,7 +19,7 @@ No se debe editar a mano.
Gancio provide an online agenda open to contributions, and federated with the fediverse using ActivityPub. Gancio provide an online agenda open to contributions, and federated with the fediverse using ActivityPub.
**Versión actual:** 1.15.5~ynh2 **Versión actual:** 1.16.2~ynh1
**Demo:** <https://demo.gancio.org/> **Demo:** <https://demo.gancio.org/>

View file

@ -19,7 +19,7 @@ EZ editatu eskuz.
Gancio provide an online agenda open to contributions, and federated with the fediverse using ActivityPub. Gancio provide an online agenda open to contributions, and federated with the fediverse using ActivityPub.
**Paketatutako bertsioa:** 1.15.5~ynh2 **Paketatutako bertsioa:** 1.16.2~ynh1
**Demoa:** <https://demo.gancio.org/> **Demoa:** <https://demo.gancio.org/>

View file

@ -18,7 +18,7 @@ Il NE doit PAS être modifié à la main.
Gancio propose un agenda en ligne ouvert aux contributions, et fédéré avec le fediverse via ActivityPub. Gancio propose un agenda en ligne ouvert aux contributions, et fédéré avec le fediverse via ActivityPub.
**Version incluse:** 1.15.5~ynh2 **Version incluse:** 1.16.2~ynh1
**Démo:** <https://demo.gancio.org/> **Démo:** <https://demo.gancio.org/>

View file

@ -19,7 +19,7 @@ NON debe editarse manualmente.
Gancio provide an online agenda open to contributions, and federated with the fediverse using ActivityPub. Gancio provide an online agenda open to contributions, and federated with the fediverse using ActivityPub.
**Versión proporcionada:** 1.15.5~ynh2 **Versión proporcionada:** 1.16.2~ynh1
**Demo:** <https://demo.gancio.org/> **Demo:** <https://demo.gancio.org/>

View file

@ -19,7 +19,7 @@
Gancio provide an online agenda open to contributions, and federated with the fediverse using ActivityPub. Gancio provide an online agenda open to contributions, and federated with the fediverse using ActivityPub.
**分发版本:** 1.15.5~ynh2 **分发版本:** 1.16.2~ynh1
**演示:** <https://demo.gancio.org/> **演示:** <https://demo.gancio.org/>

View file

@ -1,7 +1,7 @@
{ {
"baseurl": "https://__DOMAIN__", "baseurl": "https://__DOMAIN__",
"server": { "server": {
"host": "localhost", "host": "127.0.0.1",
"port": "__PORT__" "port": "__PORT__"
}, },
"log_level": "debug", "log_level": "debug",

View file

@ -8,7 +8,7 @@ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__INSTALL_DIR__/ WorkingDirectory=__INSTALL_DIR__/
Environment="__YNH_NODE_LOAD_PATH__" Environment="__YNH_NODE_LOAD_PATH__"
ExecStart=__YNH_NODE__ server/cli.js start --config ./config.json ExecStart=__YNH_NODE__ server/cli.js start --config __INSTALL_DIR__/config.json
# Sandboxing options to harden security # Sandboxing options to harden security
# Depending on specificities of your service/app, you may need to tweak these # Depending on specificities of your service/app, you may need to tweak these

View file

@ -6,7 +6,7 @@ name = "Gancio"
description.en = "Shared agenda for local communities, federated with the fediverse" description.en = "Shared agenda for local communities, federated with the fediverse"
description.fr = "Agenda partagé pour les communautés locales, fédéré avec le fédiverse" description.fr = "Agenda partagé pour les communautés locales, fédéré avec le fédiverse"
version = "1.15.5~ynh2" version = "1.16.2~ynh1"
maintainers = ["Lapineige"] maintainers = ["Lapineige"]
@ -49,7 +49,7 @@ ram.runtime = "50M"
[install.password] [install.password]
help.en = "Choose admin user password" help.en = "Choose admin user password"
help.fr = "Choisissez le mot de passe du compte d'administration." help.fr = "Choisissez le mot de passe du compte d'administration"
type = "password" type = "password"
[resources] [resources]
@ -57,11 +57,11 @@ ram.runtime = "50M"
[resources.sources] [resources.sources]
[resources.sources.main] [resources.sources.main]
url = "https://framagit.org/les/gancio/-/releases/v1.15.5/downloads/gancio.tgz" url = "https://gancio.org/releases/gancio-v1.16.2.tgz"
sha256 = "34090ca1a132f983529fb7582dae9d9f707256c005721933c90ad1386fe238f0" sha256 = "b1c572df89744f7be9f953e7fc5e3c21e9d8f7ca43a6eda3c040a0872320d132"
autoupdate.strategy = "latest_gitlab_release" #autoupdate.strategy = "latest_gitlab_release"
autoupdate.asset = "^gancio.*.tgz$" #autoupdate.asset = "^gancio-v*.tgz$"
[resources.system_user] [resources.system_user]
allow_email = true allow_email = true

View file

@ -28,23 +28,13 @@ ynh_backup --src_path="$install_dir"
ynh_backup --src_path="$data_dir" --is_big ynh_backup --src_path="$data_dir" --is_big
#================================================= #=================================================
# BACKUP THE NGINX CONFIGURATION # SYSTEM CONFIGURATION
#================================================= #=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# SPECIFIC BACKUP
#=================================================
# BACKUP LOGROTATE
#=================================================
ynh_backup --src_path="/etc/logrotate.d/$app" ynh_backup --src_path="/etc/logrotate.d/$app"
#=================================================
# BACKUP SYSTEMD
#=================================================
ynh_backup --src_path="/etc/systemd/system/$app.service" ynh_backup --src_path="/etc/systemd/system/$app.service"
#================================================= #=================================================

View file

@ -9,6 +9,8 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
mail=$(ynh_user_get_info --username=$admin --key=mail)
#================================================= #=================================================
# INSTALL DEPENDENCIES # INSTALL DEPENDENCIES
#================================================= #=================================================
@ -62,14 +64,11 @@ chown $app:$app "$install_dir/config.json"
#================================================= #=================================================
# INSTALL YARN AND APP # INSTALL YARN AND APP
#================================================= #=================================================
ynh_script_progression --message="Installing app dependencies and creating admin user..." --weight=15 ynh_script_progression --message="Installing app dependencies..." --weight=15
pushd $install_dir pushd $install_dir
ynh_use_nodejs ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn install # Install dependencies ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn install
#ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn build
admin_mail=$(ynh_user_get_info --username=$admin --key=mail)
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH ./server/cli.js users create $admin_mail $password admin --config ./config.json
popd popd
#================================================= #=================================================
@ -80,7 +79,18 @@ popd
ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_script_progression --message="Starting a systemd service..." --weight=1
# Start a systemd service # Start a systemd service
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" # It also initializes the database to allow creating the admin user
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="START TASK MANAGER" --timeout=30
#=================================================
# CREATING ADMIN USER
#=================================================
ynh_script_progression --message="Creating admin user..." --weight=15
pushd $install_dir
admin_mail=$(ynh_user_get_info --username=$admin --key=mail)
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH ./server/cli.js users create $admin_mail $password admin --config ./config.json
popd
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT

View file

@ -65,7 +65,6 @@ chown $app:$app "/var/log/$app"
yunohost service add $app --description="Federated shared agenda for local communities" --log="/var/log/$app/$app.log" yunohost service add $app --description="Federated shared agenda for local communities" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
#================================================= #=================================================
@ -74,7 +73,7 @@ yunohost service add $app --description="Federated shared agenda for local commu
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
# Typically you only have either $app or php-fpm but not both at the same time... # Typically you only have either $app or php-fpm but not both at the same time...
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="START TASK MANAGER" --timeout=30
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload
#================================================= #=================================================

View file

@ -9,8 +9,6 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
# STOP SYSTEMD SERVICE # STOP SYSTEMD SERVICE
#================================================= #=================================================
@ -21,14 +19,10 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression --message="Upgrading source files..." --weight=1
if [ "$upgrade_type" == "UPGRADE_APP" ] # Download, check integrity, uncompress and patch the source from app.src
then ynh_setup_source --dest_dir="$install_dir" --keep="config.json"
ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --keep="config.json"
fi
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
@ -81,7 +75,7 @@ popd
#================================================= #=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="START TASK MANAGER" --timeout=30
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT