mirror of
https://github.com/YunoHost-Apps/codimd_ynh.git
synced 2024-09-03 18:16:32 +02:00
parent
0fe2959af1
commit
dd02609ce2
12 changed files with 32 additions and 33 deletions
|
@ -50,8 +50,7 @@ You can configure CodiMD by editing this file `/var/www/codimd/config.json` usin
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Developer info
|
## Developer info
|
||||||
----------------
|
|
||||||
|
|
||||||
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/codimd_ynh/tree/testing).
|
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/codimd_ynh/tree/testing).
|
||||||
|
|
||||||
|
|
|
@ -50,8 +50,7 @@ Vous pouvez configurer CodiMD en modifiant le fichier `/var/www/codimd/config.js
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Informations pour les développeurs
|
## Informations pour les développeurs
|
||||||
----------------
|
|
||||||
|
|
||||||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/codimd_ynh/tree/testing).
|
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/codimd_ynh/tree/testing).
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
SOURCE_URL=https://github.com/codimd/server/archive/1.6.0.tar.gz
|
SOURCE_URL=https://github.com/codimd/server/archive/1.6.0.tar.gz
|
||||||
SOURCE_SUM=3639eaf70a37ee0513c75259c70b3d0c2c10116e9b2989dc9c571f98017120bd
|
SOURCE_SUM=5cb53b9441817f2e17f998057174f89213c96924d55b444bdaac35d0e48fab03
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
SOURCE_FILENAME=codimd.tar.gz
|
SOURCE_FILENAME=
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
"email": true,
|
"email": true,
|
||||||
"allowEmailRegister": true,
|
"allowEmailRegister": true,
|
||||||
"imageUploadType": "filesystem",
|
"imageUploadType": "filesystem",
|
||||||
|
"tooBusyLag": 1000,
|
||||||
"hsts": {
|
"hsts": {
|
||||||
"enable": true,
|
"enable": true,
|
||||||
"maxAgeSeconds": 31536000,
|
"maxAgeSeconds": 31536000,
|
||||||
|
|
|
@ -7,7 +7,7 @@ about: Create a report to help us debug, it would be nice to fill the template a
|
||||||
**How to post a meaningful bug report**
|
**How to post a meaningful bug report**
|
||||||
1. *Read this whole template first.*
|
1. *Read this whole template first.*
|
||||||
2. *Determine if you are on the right place:*
|
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!*
|
- *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.*
|
- *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.*
|
- *If you have a doubt, post here, we will figure it out together.*
|
||||||
3. *Delete the italic comments as you write over them below, and remove this guide.*
|
3. *Delete the italic comments as you write over them below, and remove this guide.*
|
||||||
|
@ -34,8 +34,8 @@ about: Create a report to help us debug, it would be nice to fill the template a
|
||||||
- *If you used the webadmin, please perform the equivalent command from the CLI first.*
|
- *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:*
|
- *If the error occurs in your browser, explain what you did:*
|
||||||
1. *Go to '...'*
|
1. *Go to '...'*
|
||||||
2. *Click on '....'*
|
2. *Click on '...'*
|
||||||
3. *Scroll down to '....'*
|
3. *Scroll down to '...'*
|
||||||
4. *See error*
|
4. *See error*
|
||||||
|
|
||||||
**Expected behavior**
|
**Expected behavior**
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Collaborative editor to work on notes written in Markdown",
|
"en": "Collaborative editor to work on notes written in Markdown",
|
||||||
"fr": "Éditeur collaboratif pour travailler sur des notes en Markdown"
|
"fr": "Éditeur collaboratif pour travailler sur des notes en Markdown"
|
||||||
},
|
},
|
||||||
"version": "1.6.0~ynh4",
|
"version": "1.6.0~ynh5",
|
||||||
"url": "https://github.com/codimd/server",
|
"url": "https://github.com/codimd/server",
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
|
|
@ -66,4 +66,4 @@ ynh_psql_dump_db --database="$db_name" > db.sql
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
ynh_print_info --message="Backup script completed for CodiMD. (YunoHost will then actually copy those files to the archive)."
|
||||||
|
|
|
@ -36,7 +36,7 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Backing up $app before changing its url (may take a while)..." --weight=1
|
ynh_script_progression --message="Backing up CodiMD before changing its URL (may take a while)..." --weight=1
|
||||||
|
|
||||||
# Backup the current version of the app
|
# Backup the current version of the app
|
||||||
ynh_backup_before_upgrade
|
ynh_backup_before_upgrade
|
||||||
|
@ -78,7 +78,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app
|
||||||
#=================================================
|
#=================================================
|
||||||
# MODIFY URL IN NGINX CONF
|
# MODIFY URL IN NGINX CONF
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Updating Nginx web server configuration..." --weight=1
|
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
|
||||||
|
|
||||||
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
|
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reloading Nginx web server..." --weight=1
|
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
|
@ -148,4 +148,4 @@ ynh_systemd_action --service_name=nginx --action=reload
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_script_progression --message="Change of URL completed for $app" --last
|
ynh_script_progression --message="Change of URL completed for CodiMD" --last
|
||||||
|
|
|
@ -100,9 +100,9 @@ ynh_setup_source --dest_dir=$final_path
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring Nginx web server..." --weight=2
|
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
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -118,7 +118,7 @@ ynh_system_user_create --username=$app --home_dir=$final_path
|
||||||
#==============================================
|
#==============================================
|
||||||
# INSTALL CODIMD
|
# INSTALL CODIMD
|
||||||
#==============================================
|
#==============================================
|
||||||
ynh_script_progression --message="Building $app... (this will take some time and resources!)" --weight=240
|
ynh_script_progression --message="Building CodiMD... (this will take some time and resources!)" --weight=240
|
||||||
|
|
||||||
pushd "$final_path" || ynh_die
|
pushd "$final_path" || ynh_die
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reloading Nginx web server..." --weight=2
|
ynh_script_progression --message="Reloading NGINX web server..." --weight=2
|
||||||
|
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
|
@ -214,4 +214,4 @@ ynh_systemd_action --service_name=nginx --action=reload
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_script_progression --message="Installation of $app completed" --last
|
ynh_script_progression --message="Installation of CodiMD completed" --last
|
||||||
|
|
|
@ -64,7 +64,7 @@ ynh_remove_nodejs
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE APP MAIN DIR
|
# REMOVE APP MAIN DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Removing app main directory..." --weight=6
|
ynh_script_progression --message="Removing CodiMD main directory..." --weight=6
|
||||||
|
|
||||||
# Remove the app directory securely
|
# Remove the app directory securely
|
||||||
ynh_secure_remove --file="$final_path"
|
ynh_secure_remove --file="$final_path"
|
||||||
|
@ -72,9 +72,9 @@ ynh_secure_remove --file="$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE NGINX CONFIGURATION
|
# REMOVE NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Removing Nginx web server configuration..." --weight=5
|
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=5
|
||||||
|
|
||||||
# Remove the dedicated nginx config
|
# Remove the dedicated NGINX config
|
||||||
ynh_remove_nginx_config
|
ynh_remove_nginx_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -91,4 +91,4 @@ ynh_system_user_delete --username=$app
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_script_progression --message="Removal of $app completed" --last
|
ynh_script_progression --message="Removal of CodiMD completed" --last
|
||||||
|
|
|
@ -48,14 +48,14 @@ test ! -d $final_path \
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE NGINX CONFIGURATION
|
# RESTORE THE NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Restoring the nginx configuration..."
|
ynh_script_progression --message="Restoring the NGINX configuration..."
|
||||||
|
|
||||||
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
|
# RESTORE THE APP MAIN DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Restoring the app main directory..." --weight=60
|
ynh_script_progression --message="Restoring CodiMD main directory..." --weight=60
|
||||||
|
|
||||||
ynh_restore_file --origin_path="$final_path"
|
ynh_restore_file --origin_path="$final_path"
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reloading Nginx web server..." --weight=1
|
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
|
@ -135,4 +135,4 @@ ynh_systemd_action --service_name=nginx --action=reload
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_script_progression --message="Restoration completed for $app" --last
|
ynh_script_progression --message="Restoration completed for CodiMD" --last
|
||||||
|
|
|
@ -36,7 +36,7 @@ upgrade_type=$(ynh_check_app_version_changed)
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Backing up $app before upgrading (may take a while)..." --weight=120
|
ynh_script_progression --message="Backing up CodiMD before upgrading (may take a while)..." --weight=120
|
||||||
|
|
||||||
# Backup the current version of the app
|
# Backup the current version of the app
|
||||||
ynh_backup_before_upgrade
|
ynh_backup_before_upgrade
|
||||||
|
@ -88,7 +88,7 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading Nginx web server configuration..." --weight=2
|
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
|
||||||
|
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
@ -121,7 +121,7 @@ ynh_system_user_create --username=$app
|
||||||
#==============================================
|
#==============================================
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Building $app... (this will take some time and resources!)" --weight=160
|
ynh_script_progression --message="Building CodiMD... (this will take some time and resources!)" --weight=160
|
||||||
|
|
||||||
pushd "$final_path" || ynh_die
|
pushd "$final_path" || ynh_die
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reloading Nginx web server..." --weight=1
|
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
|
@ -199,4 +199,4 @@ ynh_systemd_action --service_name=nginx --action=reload
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_script_progression --message="Upgrade of $app completed" --last
|
ynh_script_progression --message="Upgrade of CodiMD completed" --last
|
||||||
|
|
Loading…
Reference in a new issue