diff --git a/issue_template.md b/.github/ISSUE_TEMPLATE.md similarity index 54% rename from issue_template.md rename to .github/ISSUE_TEMPLATE.md index 35753eb..2729a6b 100644 --- a/issue_template.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,6 +1,6 @@ --- name: Bug report -about: Create a report to help us debug, it would be nice to fill the template as much as you can to help us, help you and help us all. +about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently. --- @@ -8,28 +8,30 @@ about: Create a report to help us debug, it would be nice to fill the template a 1. *Read this whole template first.* 2. *Determine if you are on the right place:* - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!* - - *Otherwise, the issue may be due to CodiMD itself. Refer to its documentation or repository for help.* - - *If you have a doubt, post here, we will figure it out together.* + - *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.* + - *When in doubt, post here and we will figure it out together.* 3. *Delete the italic comments as you write over them below, and remove this guide.* --- -**Describe the bug** +### Describe the bug + *A clear and concise description of what the bug is.* -**Versions** +### Context + - Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...* - YunoHost version: x.x.x - I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...* -- Are you in a special context or did you perform some particular tweaking on your YunoHost instance ?: *no / yes* +- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes* - If yes, please explain: - Using, or trying to install package version/branch: -- If upgrading, current package version: *can be found in the admin, or with `yunohost app info codimd`* +- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`* + +### Steps to reproduce -**To Reproduce** -*Steps to reproduce the behavior.* - *If you performed a command from the CLI, the command itself is enough. For example:* ```sh - sudo yunohost app install codimd + sudo yunohost app install the_app ``` - *If you used the webadmin, please perform the equivalent command from the CLI first.* - *If the error occurs in your browser, explain what you did:* @@ -38,9 +40,16 @@ about: Create a report to help us debug, it would be nice to fill the template a 3. *Scroll down to '...'* 4. *See error* -**Expected behavior** +### Expected behavior + *A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.* -**Logs** -*After a failed command, YunoHost makes the log available to you, but also to others, thanks to `yunohost log display [log name] --share`. The actual command, with the correct log name, is displayed at the end of the failed attempt in the CLI. Execute it and copy here the share link it outputs.* +### Logs + +*When an operation fails, YunoHost provides a simple way to share the logs.* +- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.* +- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.* + +*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)* + *If applicable and useful, add screenshots to help explain your problem.* diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ef70e18 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +## Problem + +- *Description of why you made this PR* + +## Solution + +- *And how do you fix that problem* + +## PR Status + +- [ ] Code finished and ready to be reviewed/tested +- [ ] The fix/enhancement were manually tested (if applicable) + +## Automatic tests + +Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization) diff --git a/README.md b/README.md index 82d93a4..c24ab5b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ + + # CodiMD for YunoHost [![Integration level](https://dash.yunohost.org/integration/codimd.svg)](https://dash.yunohost.org/appci/app/codimd) ![](https://ci-apps.yunohost.org/ci/badges/codimd.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/codimd.maintain.svg) @@ -5,50 +10,40 @@ *[Lire ce readme en français.](./README_fr.md)* -> *This package allows you to install CodiMD 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.* +> *This package allows you to install CodiMD 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 -CodiMD is a real-time collaborative word processing web service. It uses Markdown language. -**Shipped version:** 2.4.1 +Collaborative editor to work on notes written in Markdown + +**Shipped version:** 2.4.1~ynh1 + + ## Screenshots -![](https://raw.githubusercontent.com/hackmdio/codimd/develop/public/screenshot.png) +![](./doc/screenshots/screenshot.png) -## Demo +## Disclaimers / important information -* [Official demo]() - -## Configuration - -You can configure CodiMD by editing this file `/var/www/codimd/config.json` using the [documentation](https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-configuration) - -## Documentation - - * Official documentation: https://hackmd.io/c/codimd-documentation - * YunoHost documentation: https://yunohost.org/en/app_codimd - -## YunoHost specific features - -#### Multi-user support +### Multi-user support * Is LDAP supported? **Yes** * Can the app be used by multiple users? **Yes** -#### Supported architectures +### Configuration -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/codimd.svg)](https://ci-apps.yunohost.org/ci/apps/codimd/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/codimd.svg)](https://ci-apps-arm.yunohost.org/ci/apps/codimd/) +You can configure CodiMD by editing this file `/var/www/codimd/config.json` using the [documentation](https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-configuration) -## Links +## Documentation and resources - * Report a bug: https://github.com/YunoHost-Apps/codimd_ynh/issues - * Upstream app repository: https://github.com/hackmdio/codimd - * YunoHost website: https://yunohost.org/ - ---- +* Official app website: https://hackmd.io/ +* Official user documentation: https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-documentation#User-Guides +* Official admin documentation: https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-documentation#Administration-Guides +* Upstream app code repository: https://github.com/hackmdio/codimd +* YunoHost documentation for this app: https://yunohost.org/app_codimd +* Report a bug: https://github.com/YunoHost-Apps/codimd_ynh/issues ## Developer info @@ -60,3 +55,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/codimd_ynh/tree/testi or sudo yunohost app upgrade codimd -u https://github.com/YunoHost-Apps/codimd_ynh/tree/testing --debug ``` + +**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/README_fr.md b/README_fr.md index 093d553..b2675c2 100644 --- a/README_fr.md +++ b/README_fr.md @@ -3,52 +3,43 @@ [![Niveau d'intégration](https://dash.yunohost.org/integration/codimd.svg)](https://dash.yunohost.org/appci/app/codimd) ![](https://ci-apps.yunohost.org/ci/badges/codimd.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/codimd.maintain.svg) [![Installer CodiMD avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=codimd) -*[Read this readme in english.](./README.md)* +*[Read this readme in english.](./README.md)* +*[Lire ce readme en français.](./README_fr.md)* -> *Ce package vous permet d'installer CodiMD rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/install) pour apprendre comment l'installer.* +> *Ce package vous permet d'installer CodiMD 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 -CodiMD est un service web de traitement de texte collaboratif en temps réel. Il utilise le langage Markdown. -**Version incluse :** 2.4.1 +Éditeur collaboratif pour travailler sur des notes en Markdown + +**Version incluse :** 2.4.1~ynh1 + + ## Captures d'écran -![](https://raw.githubusercontent.com/hackmdio/codimd/develop/public/screenshot.png) +![](./doc/screenshots/screenshot.png) -## Démo +## Avertissements / informations importantes -* [Démo officielle]() +### Multi-user support -## Configuration +* Is LDAP supported? **Yes** +* Can the app be used by multiple users? **Yes** -Vous pouvez configurer CodiMD en modifiant le fichier `/var/www/codimd/config.json` et en vous aidant de la [documentation](https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-configuration) +### Configuration -## Documentation +You can configure CodiMD by editing this file `/var/www/codimd/config.json` using the [documentation](https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-configuration) - * Documentation officielle : https://hackmd.io/c/codimd-documentation - * Documentation YunoHost : https://yunohost.org/fr/app_codimd +## Documentations et ressources -## Caractéristiques spécifiques YunoHost - -#### Support multi-utilisateur - -* L'authentification LDAP est-elle prise en charge ? **Oui** -* L'application peut-elle être utilisée par plusieurs utilisateurs ? **Oui** - -#### Architectures supportées - -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/codimd.svg)](https://ci-apps.yunohost.org/ci/apps/codimd/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/codimd.svg)](https://ci-apps-arm.yunohost.org/ci/apps/codimd/) - -## Liens - - * Signaler un bug : https://github.com/YunoHost-Apps/codimd_ynh/issues - * Dépôt de l'application principale : https://github.com/hackmdio/codimd - * Site web YunoHost : https://yunohost.org/ - ---- +* Site officiel de l'app : https://hackmd.io/ +* Documentation officielle utilisateur : https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-documentation#User-Guides +* Documentation officielle de l'admin : https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-documentation#Administration-Guides +* Dépôt de code officiel de l'app : https://github.com/hackmdio/codimd +* Documentation YunoHost pour cette app : https://yunohost.org/app_codimd +* Signaler un bug : https://github.com/YunoHost-Apps/codimd_ynh/issues ## Informations pour les développeurs @@ -60,9 +51,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/codimd_ynh/tree/testi ou sudo yunohost app upgrade codimd -u https://github.com/YunoHost-Apps/codimd_ynh/tree/testing --debug ``` -it. -``` -sudo yunohost app install https://github.com/YunoHost-Apps/codimd_ynh/tree/testing --debug -ou -sudo yunohost app upgrade codimd -u https://github.com/YunoHost-Apps/codimd_ynh/tree/testing --debug -``` + +**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/conf/systemd.service b/conf/systemd.service index 13af322..b5a8d73 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -10,7 +10,7 @@ Group=__APP__ WorkingDirectory=__FINALPATH__ Environment="NODE_ENV=production" Environment="__YNH_NODE_LOAD_PATH__" -ExecStart=__FINALPATH__ app.js +ExecStart=__YNH_NODE__ app.js Restart=always PrivateTmp=true PrivateDevices=true diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..354496c --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,8 @@ +### Multi-user support + +* Is LDAP supported? **Yes** +* Can the app be used by multiple users? **Yes** + +### Configuration + +You can configure CodiMD by editing this file `/var/www/codimd/config.json` using the [documentation](https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-configuration) diff --git a/doc/screenshots/screenshot.png b/doc/screenshots/screenshot.png new file mode 100644 index 0000000..3b26f34 Binary files /dev/null and b/doc/screenshots/screenshot.png differ diff --git a/manifest.json b/manifest.json index dbfa5f6..406dd95 100644 --- a/manifest.json +++ b/manifest.json @@ -8,6 +8,13 @@ }, "version": "2.4.1~ynh1", "url": "https://github.com/hackmdio/codimd", + "upstream": { + "license": "free", + "website": "https://hackmd.io/", + "admindoc": "https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-documentation#Administration-Guides", + "userdoc": "https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-documentation#User-Guides", + "code": "https://github.com/hackmdio/codimd" + }, "license": "AGPL-3.0-only", "maintainer": { "name": "" diff --git a/pull_request_template.md b/pull_request_template.md deleted file mode 100644 index 6c28fc5..0000000 --- a/pull_request_template.md +++ /dev/null @@ -1,16 +0,0 @@ -## Problem -- *Description of why you made this PR* - -## Solution -- *And how do you fix that problem* - -## PR Status -- [ ] Code finished. -- [ ] Tested with Package_check. -- [ ] Fix or enhancement tested. -- [ ] Upgrade from last version tested. -- [ ] Can be reviewed and tested. - -## Package_check results ---- -* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* diff --git a/scripts/change_url b/scripts/change_url index a5b16b6..e3caab9 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -17,7 +17,7 @@ old_domain=$YNH_APP_OLD_DOMAIN old_path=$YNH_APP_OLD_PATH new_domain=$YNH_APP_NEW_DOMAIN -new_path=$YNH_APP_NEW_PATH +path_url="/" app=$YNH_APP_INSTANCE_NAME @@ -60,12 +60,6 @@ then change_domain=1 fi -change_path=0 -if [ "$old_path" != "$new_path" ] -then - change_path=1 -fi - #================================================= # STANDARD MODIFICATIONS #================================================= @@ -82,18 +76,6 @@ ynh_script_progression --message="Updating NGINX web server configuration..." -- nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf -# Change the path in the nginx config file -if [ $change_path -eq 1 ] -then - # Make a backup of the original nginx config file if modified - ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for nginx helper - domain="$old_domain" - path_url="$new_path" - # Create a dedicated nginx config - ynh_add_nginx_config -fi - # Change the domain for nginx if [ $change_domain -eq 1 ] then @@ -110,21 +92,9 @@ fi # CONFIGURE CODIMD #================================================= -ynh_backup_if_checksum_is_different --file="$final_path/config.json" - -domain=$new_domain -path_url=${path_url:1} - -cp ../conf/config.json.example "$final_path/config.json" - -ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config.json" -ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/config.json" -ynh_replace_string --match_string="__PATH__" --replace_string="${path_url:1}" --target_file="$final_path/config.json" -ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/config.json" -ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/config.json" -ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/config.json" - -ynh_store_file_checksum --file="$final_path/config.json" +path=${path_url:1} +domain=new_domain +ynh_add_config --template="../conf/config.json.example" --destination="$final_path/config.json" #================================================= # GENERIC FINALISATION diff --git a/scripts/upgrade b/scripts/upgrade index b0f1660..2488c27 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -146,7 +146,6 @@ fi #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=2 -ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service" # Create a dedicated systemd config ynh_add_systemd_config