From d7094f2061ef76b32ccf6cca361a38a5f3be370a Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Sun, 7 Aug 2022 23:12:06 -0400 Subject: [PATCH 01/19] fix systemd --- conf/systemd.service | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 500b32d..1d6ffd3 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,8 +7,7 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__/ -Environment="ISSO_SETTINGS=__FINALPATH__/isso.cfg" -ExecStart=__FINALPATH__/venv/bin/gunicorn -b localhost:__PORT__ -w 4 --preload isso.run +ExecStart=__FINALPATH__/venv/bin/isso -c __FINALPATH__/isso.cfg run StandardOutput=append:/var/log/__APP__/__APP__.log StandardError=inherit From a1c685d65b1aa79636c5f90ce4b493615973668e Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 8 Aug 2022 03:12:30 +0000 Subject: [PATCH 02/19] Auto-update README --- README.md | 80 +++++++++++++++++++++++----------------------------- README_fr.md | 69 ++++++++++++++++++++++---------------------- 2 files changed, 70 insertions(+), 79 deletions(-) diff --git a/README.md b/README.md index 5d8ccc7..2cd9280 100644 --- a/README.md +++ b/README.md @@ -1,84 +1,74 @@ -# Packaging an app, starting from this example - -* Copy this app before working on it, using the ['Use this template'](https://github.com/YunoHost/example_ynh/generate) button on the Github repo. -* Edit the `manifest.json` with app specific info. -* Edit the `install`, `upgrade`, `remove`, `backup`, and `restore` scripts, and any relevant conf files in `conf/`. - * Using the [script helpers documentation.](https://yunohost.org/packaging_apps_helpers) -* Add a `LICENSE` file for the package. -* Edit `doc/DISCLAIMER*.md` -* The `README.md` files are to be automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator - ---- -# Example app for YunoHost +# Isso for YunoHost -[![Integration level](https://dash.yunohost.org/integration/example.svg)](https://dash.yunohost.org/appci/app/example) ![Working status](https://ci-apps.yunohost.org/ci/badges/example.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/example.maintain.svg) -[![Install Example app with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=example) +[![Integration level](https://dash.yunohost.org/integration/isso.svg)](https://dash.yunohost.org/appci/app/isso) ![Working status](https://ci-apps.yunohost.org/ci/badges/isso.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/isso.maintain.svg) +[![Install Isso with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=isso) *[Lire ce readme en français.](./README_fr.md)* -> *This package allows you to install Example app quickly and simply on a YunoHost server. +> *This package allows you to install Isso quickly and simply on a YunoHost server. If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview -Some long and extensive description of what the app is and does, lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. +Isso – *Ich schrei sonst* – is a lightweight commenting server written in +Python and JavaScript. It aims to be a drop-in replacement for +[Disqus](http://disqus.com). ### Features -- Ut enim ad minim veniam, quis nostrud exercitation ullamco ; -- Laboris nisi ut aliquip ex ea commodo consequat ; -- Duis aute irure dolor in reprehenderit in voluptate ; -- Velit esse cillum dolore eu fugiat nulla pariatur ; -- Excepteur sint occaecat cupidatat non proident, sunt in culpa." +- **Comments written in Markdown** + Users can edit or delete own comments (within 15 minutes by default). + Comments in moderation queue are not publicly visible before activation. +- **SQLite backend** + *Because comments are not Big Data.* +- **Disqus & WordPress Import** + You can migrate your Disqus/WordPress comments without any hassle. +- **Configurable JS client** + Embed a single JS file, 65kB (20kB gzipped) and you are done. + +**Shipped version:** 0.13.0~ynh1 -**Shipped version:** 1.0~ynh1 - -**Demo:** https://demo.example.com +**Demo:** https://isso-comments.de ## Screenshots -![Screenshot of Example app](./doc/screenshots/example.jpg) +![Screenshot of Isso](./doc/screenshots/example.jpg) ## Disclaimers / important information -* Any known limitations, constrains or stuff not working, such as (but not limited to): - * requiring a full dedicated domain ? - * architectures not supported ? - * not-working single-sign on or LDAP integration ? - * the app requires an important amount of RAM / disk / .. to install or to work properly - * etc... +* Limitations + * Requires a dedicated domain -* Other infos that people should be aware of, such as: - * any specific step to perform after installing (such as manually finishing the install, specific admin credentials, ...) - * how to configure / administrate the application if it ain't obvious - * upgrade process / specificities / things to be aware of ? - * security considerations ? +* Extra information + * The admin interface for the app is `https://yourdomain.tld/admin` + * One app instance can only be installed for one domain + * Please do not add a trailing `/` in the target_domain ## Documentation and resources -* Official app website: -* Official user documentation: -* Official admin documentation: -* Upstream app code repository: -* YunoHost documentation for this app: -* Report a bug: +* Official app website: +* Official user documentation: +* Official admin documentation: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: ## Developer info -Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/example_ynh/tree/testing). +Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/isso_ynh/tree/testing). To try the testing branch, please proceed like that. ``` bash -sudo yunohost app install https://github.com/YunoHost-Apps/example_ynh/tree/testing --debug +sudo yunohost app install https://github.com/YunoHost-Apps/isso_ynh/tree/testing --debug or -sudo yunohost app upgrade example -u https://github.com/YunoHost-Apps/example_ynh/tree/testing --debug +sudo yunohost app upgrade isso -u https://github.com/YunoHost-Apps/isso_ynh/tree/testing --debug ``` **More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index 4da6fb7..b5f870a 100644 --- a/README_fr.md +++ b/README_fr.md @@ -3,71 +3,72 @@ N.B.: This README was automatically generated by https://github.com/YunoHost/app It shall NOT be edited by hand. --> -# Exemple d'app pour YunoHost +# Isso pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/example.svg)](https://dash.yunohost.org/appci/app/example) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/example.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/example.maintain.svg) -[![Installer Example app avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=example) +[![Niveau d'intégration](https://dash.yunohost.org/integration/isso.svg)](https://dash.yunohost.org/appci/app/isso) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/isso.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/isso.maintain.svg) +[![Installer Isso avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=isso) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Example app rapidement et simplement sur un serveur YunoHost. +> *Ce package vous permet d'installer Isso rapidement et simplement sur un serveur YunoHost. Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* ## Vue d'ensemble -Some long and extensive description of what the app is and does, lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. +Isso – *Ich schrei sonst* – is a lightweight commenting server written in +Python and JavaScript. It aims to be a drop-in replacement for +[Disqus](http://disqus.com). ### Features -- Ut enim ad minim veniam, quis nostrud exercitation ullamco ; -- Laboris nisi ut aliquip ex ea commodo consequat ; -- Duis aute irure dolor in reprehenderit in voluptate ; -- Velit esse cillum dolore eu fugiat nulla pariatur ; -- Excepteur sint occaecat cupidatat non proident, sunt in culpa." +- **Comments written in Markdown** + Users can edit or delete own comments (within 15 minutes by default). + Comments in moderation queue are not publicly visible before activation. +- **SQLite backend** + *Because comments are not Big Data.* +- **Disqus & WordPress Import** + You can migrate your Disqus/WordPress comments without any hassle. +- **Configurable JS client** + Embed a single JS file, 65kB (20kB gzipped) and you are done. + +**Version incluse :** 0.13.0~ynh1 -**Version incluse :** 1.0~ynh1 - -**Démo :** https://demo.example.com +**Démo :** https://isso-comments.de ## Captures d'écran -![Capture d'écran de Example app](./doc/screenshots/example.jpg) +![Capture d'écran de Isso](./doc/screenshots/example.jpg) ## Avertissements / informations importantes -* Any known limitations, constrains or stuff not working, such as (but not limited to): - * requiring a full dedicated domain ? - * architectures not supported ? - * not-working single-sign on or LDAP integration ? - * the app requires an important amount of RAM / disk / .. to install or to work properly - * etc... +* Limitations + * Requires a dedicated domain -* Other infos that people should be aware of, such as: - * any specific step to perform after installing (such as manually finishing the install, specific admin credentials, ...) - * how to configure / administrate the application if it ain't obvious - * upgrade process / specificities / things to be aware of ? - * security considerations ? +* Extra information + * The admin interface for the app is `https://yourdomain.tld/admin` + * One app instance can only be installed for one domain + * Please do not add a trailing `/` in the target_domain ## Documentations et ressources -* Site officiel de l'app : -* Documentation officielle utilisateur : -* Documentation officielle de l'admin : -* Dépôt de code officiel de l'app : -* Documentation YunoHost pour cette app : -* Signaler un bug : +* Site officiel de l'app : +* Documentation officielle utilisateur : +* Documentation officielle de l'admin : +* Dépôt de code officiel de l'app : +* Documentation YunoHost pour cette app : +* Signaler un bug : ## Informations pour les développeurs -Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/example_ynh/tree/testing). +Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/isso_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. ``` bash -sudo yunohost app install https://github.com/YunoHost-Apps/example_ynh/tree/testing --debug +sudo yunohost app install https://github.com/YunoHost-Apps/isso_ynh/tree/testing --debug ou -sudo yunohost app upgrade example -u https://github.com/YunoHost-Apps/example_ynh/tree/testing --debug +sudo yunohost app upgrade isso -u https://github.com/YunoHost-Apps/isso_ynh/tree/testing --debug ``` **Plus d'infos sur le packaging d'applications :** From 44a0f2fd1582850a406c1ed8f075982d6f333d87 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 8 Aug 2022 03:13:18 +0000 Subject: [PATCH 03/19] Auto-update README --- README.md | 80 +++++++++++++++++++++++----------------------------- README_fr.md | 69 ++++++++++++++++++++++---------------------- 2 files changed, 70 insertions(+), 79 deletions(-) diff --git a/README.md b/README.md index 5d8ccc7..2cd9280 100644 --- a/README.md +++ b/README.md @@ -1,84 +1,74 @@ -# Packaging an app, starting from this example - -* Copy this app before working on it, using the ['Use this template'](https://github.com/YunoHost/example_ynh/generate) button on the Github repo. -* Edit the `manifest.json` with app specific info. -* Edit the `install`, `upgrade`, `remove`, `backup`, and `restore` scripts, and any relevant conf files in `conf/`. - * Using the [script helpers documentation.](https://yunohost.org/packaging_apps_helpers) -* Add a `LICENSE` file for the package. -* Edit `doc/DISCLAIMER*.md` -* The `README.md` files are to be automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator - ---- -# Example app for YunoHost +# Isso for YunoHost -[![Integration level](https://dash.yunohost.org/integration/example.svg)](https://dash.yunohost.org/appci/app/example) ![Working status](https://ci-apps.yunohost.org/ci/badges/example.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/example.maintain.svg) -[![Install Example app with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=example) +[![Integration level](https://dash.yunohost.org/integration/isso.svg)](https://dash.yunohost.org/appci/app/isso) ![Working status](https://ci-apps.yunohost.org/ci/badges/isso.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/isso.maintain.svg) +[![Install Isso with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=isso) *[Lire ce readme en français.](./README_fr.md)* -> *This package allows you to install Example app quickly and simply on a YunoHost server. +> *This package allows you to install Isso quickly and simply on a YunoHost server. If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview -Some long and extensive description of what the app is and does, lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. +Isso – *Ich schrei sonst* – is a lightweight commenting server written in +Python and JavaScript. It aims to be a drop-in replacement for +[Disqus](http://disqus.com). ### Features -- Ut enim ad minim veniam, quis nostrud exercitation ullamco ; -- Laboris nisi ut aliquip ex ea commodo consequat ; -- Duis aute irure dolor in reprehenderit in voluptate ; -- Velit esse cillum dolore eu fugiat nulla pariatur ; -- Excepteur sint occaecat cupidatat non proident, sunt in culpa." +- **Comments written in Markdown** + Users can edit or delete own comments (within 15 minutes by default). + Comments in moderation queue are not publicly visible before activation. +- **SQLite backend** + *Because comments are not Big Data.* +- **Disqus & WordPress Import** + You can migrate your Disqus/WordPress comments without any hassle. +- **Configurable JS client** + Embed a single JS file, 65kB (20kB gzipped) and you are done. + +**Shipped version:** 0.13.0~ynh1 -**Shipped version:** 1.0~ynh1 - -**Demo:** https://demo.example.com +**Demo:** https://isso-comments.de ## Screenshots -![Screenshot of Example app](./doc/screenshots/example.jpg) +![Screenshot of Isso](./doc/screenshots/example.jpg) ## Disclaimers / important information -* Any known limitations, constrains or stuff not working, such as (but not limited to): - * requiring a full dedicated domain ? - * architectures not supported ? - * not-working single-sign on or LDAP integration ? - * the app requires an important amount of RAM / disk / .. to install or to work properly - * etc... +* Limitations + * Requires a dedicated domain -* Other infos that people should be aware of, such as: - * any specific step to perform after installing (such as manually finishing the install, specific admin credentials, ...) - * how to configure / administrate the application if it ain't obvious - * upgrade process / specificities / things to be aware of ? - * security considerations ? +* Extra information + * The admin interface for the app is `https://yourdomain.tld/admin` + * One app instance can only be installed for one domain + * Please do not add a trailing `/` in the target_domain ## Documentation and resources -* Official app website: -* Official user documentation: -* Official admin documentation: -* Upstream app code repository: -* YunoHost documentation for this app: -* Report a bug: +* Official app website: +* Official user documentation: +* Official admin documentation: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: ## Developer info -Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/example_ynh/tree/testing). +Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/isso_ynh/tree/testing). To try the testing branch, please proceed like that. ``` bash -sudo yunohost app install https://github.com/YunoHost-Apps/example_ynh/tree/testing --debug +sudo yunohost app install https://github.com/YunoHost-Apps/isso_ynh/tree/testing --debug or -sudo yunohost app upgrade example -u https://github.com/YunoHost-Apps/example_ynh/tree/testing --debug +sudo yunohost app upgrade isso -u https://github.com/YunoHost-Apps/isso_ynh/tree/testing --debug ``` **More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index 4da6fb7..b5f870a 100644 --- a/README_fr.md +++ b/README_fr.md @@ -3,71 +3,72 @@ N.B.: This README was automatically generated by https://github.com/YunoHost/app It shall NOT be edited by hand. --> -# Exemple d'app pour YunoHost +# Isso pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/example.svg)](https://dash.yunohost.org/appci/app/example) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/example.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/example.maintain.svg) -[![Installer Example app avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=example) +[![Niveau d'intégration](https://dash.yunohost.org/integration/isso.svg)](https://dash.yunohost.org/appci/app/isso) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/isso.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/isso.maintain.svg) +[![Installer Isso avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=isso) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Example app rapidement et simplement sur un serveur YunoHost. +> *Ce package vous permet d'installer Isso rapidement et simplement sur un serveur YunoHost. Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* ## Vue d'ensemble -Some long and extensive description of what the app is and does, lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. +Isso – *Ich schrei sonst* – is a lightweight commenting server written in +Python and JavaScript. It aims to be a drop-in replacement for +[Disqus](http://disqus.com). ### Features -- Ut enim ad minim veniam, quis nostrud exercitation ullamco ; -- Laboris nisi ut aliquip ex ea commodo consequat ; -- Duis aute irure dolor in reprehenderit in voluptate ; -- Velit esse cillum dolore eu fugiat nulla pariatur ; -- Excepteur sint occaecat cupidatat non proident, sunt in culpa." +- **Comments written in Markdown** + Users can edit or delete own comments (within 15 minutes by default). + Comments in moderation queue are not publicly visible before activation. +- **SQLite backend** + *Because comments are not Big Data.* +- **Disqus & WordPress Import** + You can migrate your Disqus/WordPress comments without any hassle. +- **Configurable JS client** + Embed a single JS file, 65kB (20kB gzipped) and you are done. + +**Version incluse :** 0.13.0~ynh1 -**Version incluse :** 1.0~ynh1 - -**Démo :** https://demo.example.com +**Démo :** https://isso-comments.de ## Captures d'écran -![Capture d'écran de Example app](./doc/screenshots/example.jpg) +![Capture d'écran de Isso](./doc/screenshots/example.jpg) ## Avertissements / informations importantes -* Any known limitations, constrains or stuff not working, such as (but not limited to): - * requiring a full dedicated domain ? - * architectures not supported ? - * not-working single-sign on or LDAP integration ? - * the app requires an important amount of RAM / disk / .. to install or to work properly - * etc... +* Limitations + * Requires a dedicated domain -* Other infos that people should be aware of, such as: - * any specific step to perform after installing (such as manually finishing the install, specific admin credentials, ...) - * how to configure / administrate the application if it ain't obvious - * upgrade process / specificities / things to be aware of ? - * security considerations ? +* Extra information + * The admin interface for the app is `https://yourdomain.tld/admin` + * One app instance can only be installed for one domain + * Please do not add a trailing `/` in the target_domain ## Documentations et ressources -* Site officiel de l'app : -* Documentation officielle utilisateur : -* Documentation officielle de l'admin : -* Dépôt de code officiel de l'app : -* Documentation YunoHost pour cette app : -* Signaler un bug : +* Site officiel de l'app : +* Documentation officielle utilisateur : +* Documentation officielle de l'admin : +* Dépôt de code officiel de l'app : +* Documentation YunoHost pour cette app : +* Signaler un bug : ## Informations pour les développeurs -Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/example_ynh/tree/testing). +Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/isso_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. ``` bash -sudo yunohost app install https://github.com/YunoHost-Apps/example_ynh/tree/testing --debug +sudo yunohost app install https://github.com/YunoHost-Apps/isso_ynh/tree/testing --debug ou -sudo yunohost app upgrade example -u https://github.com/YunoHost-Apps/example_ynh/tree/testing --debug +sudo yunohost app upgrade isso -u https://github.com/YunoHost-Apps/isso_ynh/tree/testing --debug ``` **Plus d'infos sur le packaging d'applications :** From 1c5d7361a027b0b915e8489b4d33c7cf58425e5b Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Sun, 7 Aug 2022 23:16:56 -0400 Subject: [PATCH 04/19] add python3-venv dep --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 1d3d7a9..108c909 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app (must be on a single line) -pkg_dependencies="python3-setuptools python3-virtualenv python3-dev" +pkg_dependencies="python3-setuptools python3-virtualenv python3-dev python3-venv" #================================================= # PERSONAL HELPERS From d1e3e0e029bba00dd93963a6c7451027e1d8a5d0 Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Sun, 7 Aug 2022 23:18:04 -0400 Subject: [PATCH 05/19] added license --- LICENSE | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/LICENSE b/LICENSE index 7d1e40b..728eb63 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,21 @@ -File containing the license of your package. +MIT License -More information here: -https://yunohost.org/packaging_apps_guidelines#yep-1-3 +Copyright (c) 2022 Navan Chauhan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file From 973a32bdfb98af64babc2d907caff539744245d1 Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Sun, 7 Aug 2022 23:24:57 -0400 Subject: [PATCH 06/19] add dependencies --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 108c909..e2ddbfd 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app (must be on a single line) -pkg_dependencies="python3-setuptools python3-virtualenv python3-dev python3-venv" +pkg_dependencies="python3-setuptools python3-virtualenv python3-dev python3-venv python3-pip python3-dev" #================================================= # PERSONAL HELPERS From 6b4de8b2e3ef727a827b0dd89cc7bc5213a4791f Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Sun, 7 Aug 2022 23:33:06 -0400 Subject: [PATCH 07/19] fix dep --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index e2ddbfd..d1b85e1 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app (must be on a single line) -pkg_dependencies="python3-setuptools python3-virtualenv python3-dev python3-venv python3-pip python3-dev" +pkg_dependencies="git curl python3 python3-pip python3-venv libpq-dev libsasl2-dev python3-dev libssl-dev" #================================================= # PERSONAL HELPERS From b6a731fd159c27a7e16b0de43842a68bfcf7f138 Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Sun, 7 Aug 2022 23:44:02 -0400 Subject: [PATCH 08/19] fix dep --- scripts/_common.sh | 2 +- scripts/install | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index d1b85e1..3357689 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app (must be on a single line) -pkg_dependencies="git curl python3 python3-pip python3-venv libpq-dev libsasl2-dev python3-dev libssl-dev" +pkg_dependencies="git curl python3 python3-pip python3-venv libpq-dev libsasl2-dev python3-dev libssl-dev libffi-dev python3-cffi" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 0e6f509..230deb8 100755 --- a/scripts/install +++ b/scripts/install @@ -110,6 +110,9 @@ ynh_add_nginx_config pushd $final_path ynh_exec_as $app python3 -m venv $final_path/venv + ynh_exec_as $app "$final_path/venv/bin/pip" install --upgrade pip + ynh_exec_as $app "$final_path/venv/bin/pip" install --upgrade setuptools + ynh_exec_as $app "$final_path/venv/bin/pip" install --upgrade MarkupSafe ynh_exec_as $app "$final_path/venv/bin/pip" install isso gunicorn popd From cdc5ec190999a51f0a2f224b97b3d03996b49995 Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Sun, 7 Aug 2022 23:51:10 -0400 Subject: [PATCH 09/19] check for admin path --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index 1646e9d..1b65c07 100644 --- a/check_process +++ b/check_process @@ -1,7 +1,7 @@ ;; Test complet ; Manifest domain="domain.tld" - path="/" + path="/admin" is_public=1 admin="john" password="1Strong-Password" From 5d94c2d03670f27ac7d78b45ffc6caaa31253fcf Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Mon, 8 Aug 2022 00:06:54 -0400 Subject: [PATCH 10/19] check for admin path --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index 1b65c07..994ece8 100644 --- a/check_process +++ b/check_process @@ -1,7 +1,7 @@ ;; Test complet ; Manifest domain="domain.tld" - path="/admin" + path="/admin" (PATH) is_public=1 admin="john" password="1Strong-Password" From 971bdfa5d027899067b6920e374ec9a84a2907a8 Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Tue, 9 Aug 2022 13:05:04 -0400 Subject: [PATCH 11/19] redirect for base --- conf/nginx.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index f20ab3c..b046991 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -8,3 +8,7 @@ location __PATH__/ { # Include SSOWAT user panel. # include conf.d/yunohost_panel.conf.inc; } + +location = / { + return 301 " /admin" +} \ No newline at end of file From 8d59afa38d4a5388be94de0fb5dc9f8d6c1f2490 Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Tue, 9 Aug 2022 13:09:30 -0400 Subject: [PATCH 12/19] fix ; --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index b046991..3402865 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -10,5 +10,5 @@ location __PATH__/ { } location = / { - return 301 " /admin" + return 301 " /admin"; } \ No newline at end of file From 4f03aefded9ca5abc762b4511f5912c054bb43be Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Tue, 9 Aug 2022 13:12:52 -0400 Subject: [PATCH 13/19] remove useless template --- scripts/upgrade | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index a8e7c3a..a8c96c3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -104,8 +104,6 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Updating a configuration file..." --time --weight=1 -ynh_add_config --template="some_config_file" --destination="$final_path/some_config_file" - ynh_add_config --template="isso.cfg" --destination="$final_path/isso.cfg" chmod 400 "$final_path/isso.cfg" From 464702e25aed8dab38011c8f33284c1a6dd1df65 Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Tue, 9 Aug 2022 13:15:59 -0400 Subject: [PATCH 14/19] initialise datadir var --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index a8c96c3..1de7efd 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,6 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) admin=$(ynh_app_setting_get --app=$app --key=admin) final_path=$(ynh_app_setting_get --app=$app --key=final_path) +datadir=$(ynh_app_setting_get --app=$app --key=datadir) targetdomain=$(ynh_app_setting_get --app=$app --key=targetdomain) adminmail=$(ynh_app_setting_get --app=$app --key=adminmail) port=$(ynh_app_setting_get --app=$app --key=port) From 8c1ce61fd42c16aafc710d316b56e2f0e9fb591b Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Tue, 9 Aug 2022 13:23:29 -0400 Subject: [PATCH 15/19] fix base URL --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 3402865..fe3ae5d 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -10,5 +10,5 @@ location __PATH__/ { } location = / { - return 301 " /admin"; + return 301 "/admin"; } \ No newline at end of file From 27a0e5e5b62dc05b27388eed932b88702875d7ca Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Sat, 13 Aug 2022 18:19:51 -0400 Subject: [PATCH 16/19] redirect plain to js --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index fe3ae5d..756e65b 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -10,5 +10,5 @@ location __PATH__/ { } location = / { - return 301 "/admin"; + return 301 "/js/embed.min.js"; } \ No newline at end of file From 06f899a0826a243a91cd9487ccbc2a3b3c22193c Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Sat, 13 Aug 2022 19:11:26 -0400 Subject: [PATCH 17/19] fix backup/restore --- scripts/restore | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/restore b/scripts/restore index 1ca67c2..2c6632f 100755 --- a/scripts/restore +++ b/scripts/restore @@ -62,6 +62,17 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# Create blank log file +#================================================= + +mkdir -p "/var/log/$app" + +chmod 750 "/var/log/$app" +chmod -R o-rwx "$final_path" + +ynh_exec_as $app touch "/var/log/$app/$app.log" + #================================================= # RESTORE THE DATA DIRECTORY #================================================= From ed2caf9037815f58735b2d66e7fcc591893e00be Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Sat, 13 Aug 2022 19:32:36 -0400 Subject: [PATCH 18/19] fix restore + nginx --- check_process | 2 +- conf/nginx.conf | 8 +++++++- scripts/restore | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/check_process b/check_process index 994ece8..ee0652e 100644 --- a/check_process +++ b/check_process @@ -12,7 +12,7 @@ setup_sub_dir=0 setup_root=1 setup_nourl=0 - setup_private=1 + setup_private=0 setup_public=1 upgrade=1 upgrade=1 from_commit=CommitHash diff --git a/conf/nginx.conf b/conf/nginx.conf index 756e65b..abbdb62 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -10,5 +10,11 @@ location __PATH__/ { } location = / { - return 301 "/js/embed.min.js"; + if ($is_args = "") { + return 301 /js/embed.min.js; + } + proxy_pass http://localhost:__PORT__; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Proto $scheme; } \ No newline at end of file diff --git a/scripts/restore b/scripts/restore index 2c6632f..e21b5bd 100755 --- a/scripts/restore +++ b/scripts/restore @@ -69,7 +69,7 @@ chown -R $app:www-data "$final_path" mkdir -p "/var/log/$app" chmod 750 "/var/log/$app" -chmod -R o-rwx "$final_path" +chmod -R o-rwx "/var/log/$app" ynh_exec_as $app touch "/var/log/$app/$app.log" From b367c11ed70937406317067114ec717b967055f4 Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Sat, 13 Aug 2022 21:26:26 -0400 Subject: [PATCH 19/19] remove time and fix logs --- scripts/install | 32 ++++++++++++++++---------------- scripts/remove | 24 ++++++++++++------------ scripts/restore | 14 +++----------- 3 files changed, 31 insertions(+), 39 deletions(-) diff --git a/scripts/install b/scripts/install index 230deb8..15eac79 100755 --- a/scripts/install +++ b/scripts/install @@ -37,7 +37,7 @@ adminmail=$(ynh_user_get_info --username=$admin --key=mail) #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= -ynh_script_progression --message="Validating installation parameters..." --time --weight=1 +ynh_script_progression --message="Validating installation parameters..." --weight=1 final_path=/var/www/$app test ! -e "$final_path" || ynh_die --message="This path already contains a folder" @@ -48,7 +48,7 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_script_progression --message="Storing installation settings..." --time --weight=1 +ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url @@ -62,7 +62,7 @@ ynh_app_setting_set --app=$app --key=adminmail --value=$adminmail #================================================= # FIND AND OPEN A PORT #================================================= -ynh_script_progression --message="Finding an available port..." --time --weight=1 +ynh_script_progression --message="Finding an available port..." --weight=1 # Find an available port port=$(ynh_find_port --port=8095) @@ -71,14 +71,14 @@ ynh_app_setting_set --app=$app --key=port --value=$port #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing dependencies..." --time --weight=1 +ynh_script_progression --message="Installing dependencies..." --weight=1 ynh_install_app_dependencies $pkg_dependencies #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Configuring system user..." --time --weight=1 +ynh_script_progression --message="Configuring system user..." --weight=3 # Create a system user ynh_system_user_create --username=$app --home_dir="$final_path" @@ -86,7 +86,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # Setup Final Path #================================================= -ynh_script_progression --message="Setting up source files..." --time --weight=1 +ynh_script_progression --message="Setting up source files..." --weight=1 mkdir -p $final_path @@ -99,7 +99,7 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring NGINX web server..." --time --weight=1 +ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config @@ -119,7 +119,7 @@ popd #================================================= # CREATE DATA DIRECTORY #================================================= -ynh_script_progression --message="Creating a data directory..." --time --weight=1 +ynh_script_progression --message="Creating a data directory..." --weight=2 datadir=/home/yunohost.app/$app ynh_app_setting_set --app=$app --key=datadir --value=$datadir @@ -133,7 +133,7 @@ chown -R $app:www-data "$datadir" #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a configuration file..." --time --weight=1 +ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_add_config --template="isso.cfg" --destination="$final_path/isso.cfg" @@ -143,7 +143,7 @@ chown $app:$app "$final_path/isso.cfg" #================================================= # SETUP SYSTEMD #================================================= -ynh_script_progression --message="Configuring a systemd service..." --time --weight=1 +ynh_script_progression --message="Configuring a systemd service..." --weight=1 # Create a dedicated systemd config ynh_add_systemd_config @@ -153,7 +153,7 @@ ynh_add_systemd_config #================================================= # SETUP LOGROTATE #================================================= -ynh_script_progression --message="Configuring log rotation..." --time --weight=1 +ynh_script_progression --message="Configuring log rotation..." --weight=1 # Use logrotate to manage application logfile(s) ynh_use_logrotate @@ -161,14 +161,14 @@ ynh_use_logrotate #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --time --weight=1 +ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 yunohost service add $app --description="Isso - a commenting server" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." --time --weight=1 +ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" @@ -176,7 +176,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring permissions..." --time --weight=1 +ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary if [ $is_public -eq 1 ] @@ -195,7 +195,7 @@ ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload @@ -203,4 +203,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --time --last +ynh_script_progression --message="Installation of $app completed" --last diff --git a/scripts/remove b/scripts/remove index 69975c3..cbe2841 100755 --- a/scripts/remove +++ b/scripts/remove @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --time --weight=1 +ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME @@ -30,14 +30,14 @@ datadir=$(ynh_app_setting_get --app=$app --key=datadir) # Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status $app >/dev/null then - ynh_script_progression --message="Removing $app service integration..." --time --weight=1 + ynh_script_progression --message="Removing $app service integration..." --weight=1 yunohost service remove $app fi #================================================= # STOP AND REMOVE SERVICE #================================================= -ynh_script_progression --message="Stopping and removing the systemd service..." --time --weight=1 +ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1 # Remove the dedicated systemd config ynh_remove_systemd_config @@ -45,7 +45,7 @@ ynh_remove_systemd_config #================================================= # REMOVE LOGROTATE CONFIGURATION #================================================= -ynh_script_progression --message="Removing logrotate configuration..." --time --weight=1 +ynh_script_progression --message="Removing logrotate configuration..." --weight=1 # Remove the app-specific logrotate config ynh_remove_logrotate @@ -53,7 +53,7 @@ ynh_remove_logrotate #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing app main directory..." --time --weight=1 +ynh_script_progression --message="Removing app main directory..." --weight=1 # Remove the app directory securely ynh_secure_remove --file="$final_path" @@ -65,14 +65,14 @@ ynh_secure_remove --file="$final_path" # Remove the data directory if --purge option is used if [ "${YNH_APP_PURGE:-0}" -eq 1 ] then - ynh_script_progression --message="Removing app data directory..." --time --weight=1 + ynh_script_progression --message="Removing app data directory..." --weight=1 ynh_secure_remove --file="$datadir" fi #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --time --weight=1 +ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 # Remove the dedicated NGINX config ynh_remove_nginx_config @@ -80,7 +80,7 @@ ynh_remove_nginx_config #================================================= # REMOVE DEPENDENCIES #================================================= -ynh_script_progression --message="Removing dependencies..." --time --weight=1 +ynh_script_progression --message="Removing dependencies..." --weight=1 # Remove metapackage and its dependencies ynh_remove_app_dependencies @@ -91,7 +91,7 @@ ynh_remove_app_dependencies if yunohost firewall list | grep -q "\- $port$" then - ynh_script_progression --message="Closing port $port..." --time --weight=1 + ynh_script_progression --message="Closing port $port..." --weight=1 ynh_exec_warn_less yunohost firewall disallow TCP $port fi @@ -100,7 +100,7 @@ fi #================================================= # REMOVE VARIOUS FILES #================================================= -ynh_script_progression --message="Removing various files..." --time --weight=1 +ynh_script_progression --message="Removing various files..." --weight=2 # Remove the log files ynh_secure_remove --file="/var/log/$app" @@ -110,7 +110,7 @@ ynh_secure_remove --file="/var/log/$app" #================================================= # REMOVE DEDICATED USER #================================================= -ynh_script_progression --message="Removing the dedicated system user..." --time --weight=1 +ynh_script_progression --message="Removing the dedicated system user..." --weight=1 # Delete a system user ynh_system_user_delete --username=$app @@ -119,4 +119,4 @@ ynh_system_user_delete --username=$app # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of $app completed" --time --last +ynh_script_progression --message="Removal of $app completed" --last diff --git a/scripts/restore b/scripts/restore index e21b5bd..c042558 100755 --- a/scripts/restore +++ b/scripts/restore @@ -62,17 +62,6 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# Create blank log file -#================================================= - -mkdir -p "/var/log/$app" - -chmod 750 "/var/log/$app" -chmod -R o-rwx "/var/log/$app" - -ynh_exec_as $app touch "/var/log/$app/$app.log" - #================================================= # RESTORE THE DATA DIRECTORY #================================================= @@ -116,6 +105,9 @@ systemctl enable $app.service --quiet #================================================= ynh_script_progression --message="Restoring the logrotate configuration..." --time --weight=1 +mkdir -p "/var/log/$app" +chown -R $app: "/var/log/$app" + ynh_restore_file --origin_path="/etc/logrotate.d/$app" #=================================================