From 776f3c731924bcdf921d4692f3297eb0e74be0dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 17 Jan 2023 22:18:59 +0100 Subject: [PATCH 1/8] Set the image dir --- conf/.env.production | 2 +- conf/nginx.conf | 2 +- scripts/install | 29 +++++++++++++++-------------- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/conf/.env.production b/conf/.env.production index 89703b3..b02f964 100644 --- a/conf/.env.production +++ b/conf/.env.production @@ -15,7 +15,7 @@ DEFAULT_LANGUAGE="English" ## Leave unset to allow all hosts ALLOWED_HOSTS="localhost,127.0.0.1,[::1]" -MEDIA_ROOT=images/ +MEDIA_ROOT=__DATADIR__/images/ # Database configuration PGPORT=5432 diff --git a/conf/nginx.conf b/conf/nginx.conf index 8ad14a9..570608a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -8,7 +8,7 @@ location __PATH__/ { } location /images/ { - alias __FINALPATH__/images/; + alias __DATADIR__/images/; } location /static/ { diff --git a/scripts/install b/scripts/install index 03b297e..745c2ff 100755 --- a/scripts/install +++ b/scripts/install @@ -106,6 +106,21 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# CREATE DATA DIRECTORY +#================================================= +ynh_script_progression --message="Creating a data directory..." --weight=1 + +datadir=/home/yunohost.app/$app +ynh_app_setting_set --app=$app --key=datadir --value=$datadir + +mkdir -p $datadir +mkdir -p $datadir/images + +chmod 750 "$datadir" +chmod -R o-rwx "$datadir" +chown -R $app:www-data "$datadir" + #================================================= # CONFIGURE THEN INSTALL SCRIPT AND DEPENDENCIES #================================================= @@ -144,20 +159,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# CREATE DATA DIRECTORY -#================================================= -ynh_script_progression --message="Creating a data directory..." --weight=1 - -datadir=/home/yunohost.app/$app -ynh_app_setting_set --app=$app --key=datadir --value=$datadir - -mkdir -p $datadir - -chmod 750 "$datadir" -chmod -R o-rwx "$datadir" -chown -R $app:www-data "$datadir" - #================================================= # SETUP SYSTEMD #================================================= From 4d73254f8ee12a339b9576446527f9a6d6668c83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 19 Jan 2023 10:38:11 +0100 Subject: [PATCH 2/8] Fix formating --- doc/DISCLAIMER.md | 2 +- doc/DISCLAIMER_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index d0d6c25..d29e6a3 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -1,6 +1,6 @@ This project is still young and isn't, at the moment, very stable, so please proceed with caution when running in production. -Generate the admin code with 'sudo -u bookwyrm /var/www/bookwyrm/venv/bin/python3 /var/www/bookwyrm/manage.py admin_code', +Generate the admin code with `sudo -u bookwyrm /var/www/bookwyrm/venv/bin/python3 /var/www/bookwyrm/manage.py admin_code`, and copy the admin code to use when you create your admin account. You can get your code at any time by re-running that command. Here's an example output: ``` diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md index 0986abb..14042b6 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/DISCLAIMER_fr.md @@ -1,6 +1,6 @@ Ce projet est encore jeune et n'est pas, pour le moment, très stable, faites preuve de prudence lors de son utilisation en production. -Générez le code administrateur avec 'sudo -u bookwyrm /var/www/bookwyrm/venv/bin/python3 /var/www/bookwyrm/manage.py admin_code', +Générez le code administrateur avec `sudo -u bookwyrm /var/www/bookwyrm/venv/bin/python3 /var/www/bookwyrm/manage.py admin_code`, et copiez le code administrateur à utiliser lors de la création de votre compte administrateur. Vous pouvez obtenir votre code à tout moment en réexécutant cette commande. Voici un exemple de sortie : ``` From ecf1e51e3783bd796dc77c7f0a22690146a22abd Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 19 Jan 2023 09:38:16 +0000 Subject: [PATCH 3/8] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1e38e8f..2100e62 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ BookWyrm is a social network for tracking your reading, talking about books, wri This project is still young and isn't, at the moment, very stable, so please proceed with caution when running in production. -Generate the admin code with 'sudo -u bookwyrm /var/www/bookwyrm/venv/bin/python3 /var/www/bookwyrm/manage.py admin_code', +Generate the admin code with `sudo -u bookwyrm /var/www/bookwyrm/venv/bin/python3 /var/www/bookwyrm/manage.py admin_code`, and copy the admin code to use when you create your admin account. You can get your code at any time by re-running that command. Here's an example output: ``` diff --git a/README_fr.md b/README_fr.md index 25b0cfe..475f7a0 100644 --- a/README_fr.md +++ b/README_fr.md @@ -30,7 +30,7 @@ BookWyrm est un réseau social pour garder la trace de vos lectures, parler de l Ce projet est encore jeune et n'est pas, pour le moment, très stable, faites preuve de prudence lors de son utilisation en production. -Générez le code administrateur avec 'sudo -u bookwyrm /var/www/bookwyrm/venv/bin/python3 /var/www/bookwyrm/manage.py admin_code', +Générez le code administrateur avec `sudo -u bookwyrm /var/www/bookwyrm/venv/bin/python3 /var/www/bookwyrm/manage.py admin_code`, et copiez le code administrateur à utiliser lors de la création de votre compte administrateur. Vous pouvez obtenir votre code à tout moment en réexécutant cette commande. Voici un exemple de sortie : ``` From 4f3d9cbb8eb8ea971cbe7e608db28ea21049e549 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 19 Jan 2023 09:39:22 +0000 Subject: [PATCH 4/8] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1e38e8f..2100e62 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ BookWyrm is a social network for tracking your reading, talking about books, wri This project is still young and isn't, at the moment, very stable, so please proceed with caution when running in production. -Generate the admin code with 'sudo -u bookwyrm /var/www/bookwyrm/venv/bin/python3 /var/www/bookwyrm/manage.py admin_code', +Generate the admin code with `sudo -u bookwyrm /var/www/bookwyrm/venv/bin/python3 /var/www/bookwyrm/manage.py admin_code`, and copy the admin code to use when you create your admin account. You can get your code at any time by re-running that command. Here's an example output: ``` diff --git a/README_fr.md b/README_fr.md index 25b0cfe..475f7a0 100644 --- a/README_fr.md +++ b/README_fr.md @@ -30,7 +30,7 @@ BookWyrm est un réseau social pour garder la trace de vos lectures, parler de l Ce projet est encore jeune et n'est pas, pour le moment, très stable, faites preuve de prudence lors de son utilisation en production. -Générez le code administrateur avec 'sudo -u bookwyrm /var/www/bookwyrm/venv/bin/python3 /var/www/bookwyrm/manage.py admin_code', +Générez le code administrateur avec `sudo -u bookwyrm /var/www/bookwyrm/venv/bin/python3 /var/www/bookwyrm/manage.py admin_code`, et copiez le code administrateur à utiliser lors de la création de votre compte administrateur. Vous pouvez obtenir votre code à tout moment en réexécutant cette commande. Voici un exemple de sortie : ``` From cf356151f842185bf0bf3029a4604665c93aa606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 22 Jan 2023 18:23:37 +0100 Subject: [PATCH 5/8] Update upgrade --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index f9d2ad2..eb5a03b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,6 +25,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #db_user=$(ynh_app_setting_get --app=$app --key=db_user) #db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) port=$(ynh_app_setting_get --app=$app --key=port) +datadir=$(ynh_app_setting_get --app=$app --key=datadir) admin_mail=$(ynh_user_get_info --username=$admin --key=username) From 51cdf21dd56a976d1059241c23e8918adde3c279 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 22 Jan 2023 17:23:41 +0000 Subject: [PATCH 6/8] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2100e62..8c883e1 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # BookWyrm for YunoHost -[![Integration level](https://dash.yunohost.org/integration/bookwyrm.svg)](https://dash.yunohost.org/appci/app/bookwyrm) ![Working status](https://ci-apps.yunohost.org/ci/badges/bookwyrm.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/bookwyrm.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/bookwyrm.svg)](https://dash.yunohost.org/appci/app/bookwyrm) ![Working status](https://ci-apps.yunohost.org/ci/badges/bookwyrm.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/bookwyrm.maintain.svg) [![Install BookWyrm with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=bookwyrm) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index 475f7a0..9634ff7 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # BookWyrm pour YunoHost -[![Niveau d’intégration](https://dash.yunohost.org/integration/bookwyrm.svg)](https://dash.yunohost.org/appci/app/bookwyrm) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/bookwyrm.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/bookwyrm.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/bookwyrm.svg)](https://dash.yunohost.org/appci/app/bookwyrm) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/bookwyrm.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/bookwyrm.maintain.svg) [![Installer BookWyrm avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=bookwyrm) *[Read this readme in english.](./README.md)* From abce1a8a334a6938d9acaca1b3854a16b023191e Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 27 Jan 2023 06:10:23 +0000 Subject: [PATCH 7/8] Upgrade to v0.5.4 --- conf/app.src | 4 ++-- manifest.json | 17 ++++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/conf/app.src b/conf/app.src index 649cbe2..4bc4e4d 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/bookwyrm-social/bookwyrm/archive/refs/tags/v0.5.3.tar.gz -SOURCE_SUM=41E263369BB3E0ED23AF6D6E112BD35EDE082BD5BECFE1BE9BBA152E47EE4E86 +SOURCE_URL=https://github.com/bookwyrm-social/bookwyrm/archive/refs/tags/v0.5.4.tar.gz +SOURCE_SUM=2dafdcf26de6c041611d16ed48b751cf8d4dfbee1f5cf4aa5975592bc080261d SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 8a43020..2e1a619 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Platform for social reading", "fr": "Plateforme de lecture sociale" }, - "version": "0.5.3~ynh1", + "version": "0.5.4~ynh1", "url": "https://github.com/bookwyrm-social/bookwyrm", "upstream": { "license": "AGPL-3.0-or-later", @@ -22,8 +22,8 @@ "requirements": { "yunohost": ">= 11.0.9" }, - "multi_instance": true, - "services": [ + "multi_instance": true, + "services": [ "nginx", "postgresql" ], @@ -33,7 +33,6 @@ "name": "domain", "type": "domain" }, - { "name": "is_public", "type": "boolean", @@ -46,7 +45,15 @@ "en": "Choose the application language", "fr": "Choisissez la langue de l'application" }, - "choices": ["de-de", "en-us", "es-es", "fr-fr", "it-it", "pt-pt", "zh-hans"], + "choices": [ + "de-de", + "en-us", + "es-es", + "fr-fr", + "it-it", + "pt-pt", + "zh-hans" + ], "default": "fr-fr" }, { From 2c95c193afe365c46a6f13ca50d8722468159af3 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 27 Jan 2023 06:10:29 +0000 Subject: [PATCH 8/8] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8c883e1..c71ae4f 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in BookWyrm is a social network for tracking your reading, talking about books, writing reviews, and discovering what to read next. -**Shipped version:** 0.5.3~ynh1 +**Shipped version:** 0.5.4~ynh1 **Demo:** https://joinbookwyrm.com/fr/ diff --git a/README_fr.md b/README_fr.md index 9634ff7..0e6d9c6 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po BookWyrm est un réseau social pour garder la trace de vos lectures, parler de livres, écrire des critiques et découvrir quoi lire ensuite. -**Version incluse :** 0.5.3~ynh1 +**Version incluse :** 0.5.4~ynh1 **Démo :** https://joinbookwyrm.com/fr/