From 5c191dca375803fd433f9b8b4ab69efbefa59ad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 8 Jun 2024 14:46:31 +0200 Subject: [PATCH 01/15] Update _common.sh --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 542ddd1..66db614 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ nodejs_version=20 -facilmap_version=3.4.0 +facilmap_version=4.1.1 #================================================= # PERSONAL HELPERS From 4533c5708d516516f85c0934f0a1351d005a7351 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 8 Jun 2024 12:46:37 +0000 Subject: [PATCH 02/15] Auto-update READMEs --- ALL_README.md | 1 + README_es.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++ README_zh_Hans.md | 2 +- 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 README_es.md diff --git a/ALL_README.md b/ALL_README.md index a01b345..152f2e7 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,6 +1,7 @@ # All available README files by language - [Read the README in English](README.md) +- [Lea el README en español](README_es.md) - [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) diff --git a/README_es.md b/README_es.md new file mode 100644 index 0000000..83d6702 --- /dev/null +++ b/README_es.md @@ -0,0 +1,50 @@ + + +# Facilmap para Yunohost + +[![Nivel de integración](https://dash.yunohost.org/integration/facilmap.svg)](https://dash.yunohost.org/appci/app/facilmap) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/facilmap.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/facilmap.maintain.svg) + +[![Instalar Facilmap con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=facilmap) + +*[Leer este README en otros idiomas.](./ALL_README.md)* + +> *Este paquete le permite instalarFacilmap rapidamente y simplement en un servidor YunoHost.* +> *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.* + +## Descripción general + +Collaborative maps and routing with a straightforward interface + +**Versión actual:** 3.4.0~ynh3 + +**Demo:** + +## Capturas + +![Captura de Facilmap](./doc/screenshots/screenshot.webp) + +## Documentaciones y recursos + +- Sitio web oficial: +- Documentación usuario oficial: +- Documentación administrador oficial: +- Repositorio del código fuente oficial de la aplicación : +- Catálogo YunoHost: +- Reportar un error: + +## Información para desarrolladores + +Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/facilmap_ynh/tree/testing + +Para probar la rama `testing`, sigue asÍ: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/facilmap_ynh/tree/testing --debug +o +sudo yunohost app upgrade facilmap -u https://github.com/YunoHost-Apps/facilmap_ynh/tree/testing --debug +``` + +**Mas informaciones sobre el empaquetado de aplicaciones:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 5760ba2..d8bf605 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -3,7 +3,7 @@ 请勿手动编辑。 --> -# YunoHost 的 Facilmap +# YunoHost 上的 Facilmap [![集成程度](https://dash.yunohost.org/integration/facilmap.svg)](https://dash.yunohost.org/appci/app/facilmap) ![工作状态](https://ci-apps.yunohost.org/ci/badges/facilmap.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/facilmap.maintain.svg) From 615838531791d1a52ae0bcb7125a2611da5b4cc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 8 Jun 2024 14:47:35 +0200 Subject: [PATCH 03/15] fix --- scripts/install | 2 +- scripts/restore | 7 ------- scripts/upgrade | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/scripts/install b/scripts/install index 3f3beb9..5a6e023 100755 --- a/scripts/install +++ b/scripts/install @@ -44,7 +44,7 @@ chown -R "$app:www-data" "$install_dir" ynh_script_progression --message="Adding configuration..." --weight=2 mkdir -p "$install_dir/etc" -ynh_add_config --template="../conf/config.env" --destination="$install_dir/etc/facilmap.env" +ynh_add_config --template="config.env" --destination="$install_dir/etc/facilmap.env" chown -R "$app:www-data" "$install_dir/etc" chmod 400 "$install_dir/etc/facilmap.env" diff --git a/scripts/restore b/scripts/restore index 059bdc2..8dbe94e 100755 --- a/scripts/restore +++ b/scripts/restore @@ -62,13 +62,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=5 ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd" --line_match="Server started" -#================================================= -# GENERIC FINALIZATION -#================================================= -# RELOAD NGINX AND PHP-FPM -#================================================= -ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=2 - ynh_systemd_action --service_name=nginx --action=reload #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 0c5bab3..7c404d7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -46,7 +46,7 @@ chown -R "$app:www-data" "$install_dir" ynh_script_progression --message="Updating config files..." --weight=2 mkdir -p "$install_dir/etc" -ynh_add_config --template="../conf/config.env" --destination="$install_dir/etc/facilmap.env" +ynh_add_config --template="config.env" --destination="$install_dir/etc/facilmap.env" chown -R "$app:www-data" "$install_dir/etc" chmod 400 "$install_dir/etc/facilmap.env" From 0f527e9a1645402251792ee72c6e618cc9cc7561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 8 Jun 2024 14:52:59 +0200 Subject: [PATCH 04/15] cleaning --- conf/config.env | 12 ++++++++---- scripts/backup | 4 ---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/conf/config.env b/conf/config.env index 216ab97..9843147 100644 --- a/conf/config.env +++ b/conf/config.env @@ -1,3 +1,6 @@ +# Copy this file to config.env when running FacilMap standalone. +# Find all the available configuration options in the documentation: https://docs.facilmap.org/developers/server/config.html + # HTTP requests made by the backend will send this User-Agent header. Please adapt to your URL and e-mail address. USER_AGENT=__USER_AGENT__ @@ -22,12 +25,13 @@ ORS_TOKEN=__ORS_TOKEN__ # Get an API key on https://www.mapbox.com/signup/ MAPBOX_TOKEN=__MAPBOX_TOKEN__ -# MapZen is used for getting elevation information -# Get an API key on https://mapzen.com/developers/sign_up -#MAPZEN_TOKEN= - # Maxmind configuration. If specified, the maxmind GeoLite2 database will be downloaded # for Geo IP lookup (to show the initial map state) and kept in memory. # Sign up here: https://www.maxmind.com/en/geolite2/signup MAXMIND_USER_ID=__MAXMIND_USER_ID__ MAXMIND_LICENSE_KEY=__MAXMIND_LICENSE_KEY__ + +# Lima Labs provides nice double resolution layers. +# If this is defined, they are used as the default layer instead of Mapnik. +# Get an API key here: https://maps.lima-labs.com/ +#LIMA_LABS_TOKEN= diff --git a/scripts/backup b/scripts/backup index c2c3a41..4d141cd 100755 --- a/scripts/backup +++ b/scripts/backup @@ -31,10 +31,6 @@ ynh_backup --src_path="/etc/systemd/system/$app.service" ynh_backup --src_path="/etc/logrotate.d/$app" -#================================================= -# BACKUP VARIOUS FILES -#================================================= - ynh_backup --src_path="/var/log/$app/" #================================================= From 9851de8e3421b59578a48758bf4e6e33ea8c5c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 8 Jun 2024 18:13:25 +0200 Subject: [PATCH 05/15] build --- conf/systemd.service | 3 ++- manifest.toml | 10 ++++++++++ scripts/install | 12 +++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 57f0c81..2badc5c 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -9,7 +9,8 @@ Group=__APP__ Environment=NODE_ENV=production Environment=DOTENV_CONFIG_PATH=__INSTALL_DIR__/etc/facilmap.env Environment="__YNH_NODE_LOAD_PATH__" -ExecStart=__INSTALL_DIR__/bin/facilmap-server +#ExecStart=__INSTALL_DIR__/bin/facilmap-server +ExecStart=/usr/bin/yarn sserve WorkingDirectory=__INSTALL_DIR__ StandardOutput=syslog StandardError=syslog diff --git a/manifest.toml b/manifest.toml index 70c11f0..5fbe088 100644 --- a/manifest.toml +++ b/manifest.toml @@ -81,6 +81,12 @@ ram.runtime = "50M" [resources] + [resources.sources] + + [resources.sources.main] + url = "https://github.com/FacilMap/facilmap/archive/refs/tags/v4.1.1.tar.gz" + sha256 = "72cf9f7fbc6e9d5c73f7c1af02be63d2c5a99d13cf89c96af834db6004c89cf6" + [resources.ports] [resources.system_user] @@ -93,5 +99,9 @@ ram.runtime = "50M" [resources.apt] packages = "mariadb-server" + extras.yarn.repo = "deb https://dl.yarnpkg.com/debian/ stable main" + extras.yarn.key = "https://dl.yarnpkg.com/debian/pubkey.gpg" + extras.yarn.packages = "yarn" + [resources.database] type = "mysql" diff --git a/scripts/install b/scripts/install index 5a6e023..cb86d2c 100755 --- a/scripts/install +++ b/scripts/install @@ -16,6 +16,15 @@ ynh_script_progression --message="Installing NodeJS..." --weight=6 ynh_install_nodejs --nodejs_version=$nodejs_version +#================================================= +# DOWNLOAD, CHECK AND UNPACK SOURCE +#================================================= +ynh_script_progression --message="Setting up source files..." --weight=1 + +ynh_setup_source --dest_dir="$install_dir" + +chown -R "$app:www-data" "$install_dir" + #================================================= # CREATE A MYSQL DATABASE #================================================= @@ -31,7 +40,8 @@ ynh_mysql_execute_as_root --database="$db_name" --sql="ALTER DATABASE $db_name C ynh_script_progression --message="Building with NodeJS..." --weight=20 pushd "$install_dir" - ynh_exec_as $app "$ynh_node_load_PATH" "$ynh_npm" install --prefix "$install_dir" -g facilmap-server@"$facilmap_version" 2>/dev/null + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn build popd chmod 750 "$install_dir" From a11472cc70cd9228fcfe83b8ea56a7e7c602ea41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 8 Jun 2024 18:27:35 +0200 Subject: [PATCH 06/15] cleaning --- conf/systemd.service | 4 ++-- manifest.toml | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 2badc5c..7c0c215 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -10,8 +10,8 @@ Environment=NODE_ENV=production Environment=DOTENV_CONFIG_PATH=__INSTALL_DIR__/etc/facilmap.env Environment="__YNH_NODE_LOAD_PATH__" #ExecStart=__INSTALL_DIR__/bin/facilmap-server -ExecStart=/usr/bin/yarn sserve -WorkingDirectory=__INSTALL_DIR__ +WorkingDirectory=__INSTALL_DIR__/server +ExecStart=/usr/bin/yarn serve StandardOutput=syslog StandardError=syslog SyslogIdentifier=__APP__ diff --git a/manifest.toml b/manifest.toml index 5fbe088..b169147 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Facilmap" description.en = "Collaborative maps and routing with a straightforward interface" description.fr = "Carte collaborative avec une interface simple et pratique" -version = "3.4.0~ynh3" +version = "4.1.1~ynh1" maintainers = ["Squeak"] @@ -23,8 +23,11 @@ code = "https://github.com/FacilMap/facilmap" yunohost = ">= 11.2" architectures = "all" multi_instance = true + ldap = false + sso = false + disk = "50M" ram.build = "50M" ram.runtime = "50M" @@ -86,6 +89,7 @@ ram.runtime = "50M" [resources.sources.main] url = "https://github.com/FacilMap/facilmap/archive/refs/tags/v4.1.1.tar.gz" sha256 = "72cf9f7fbc6e9d5c73f7c1af02be63d2c5a99d13cf89c96af834db6004c89cf6" + autoupdate.strategy = "latest_github_tag" [resources.ports] @@ -102,6 +106,6 @@ ram.runtime = "50M" extras.yarn.repo = "deb https://dl.yarnpkg.com/debian/ stable main" extras.yarn.key = "https://dl.yarnpkg.com/debian/pubkey.gpg" extras.yarn.packages = "yarn" - + [resources.database] type = "mysql" From 8bff33399c648c0f3e93344f098fc9a119d71ea9 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 8 Jun 2024 16:27:40 +0000 Subject: [PATCH 07/15] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 906a80d..4f9cdfe 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ It shall NOT be edited by hand. Collaborative maps and routing with a straightforward interface -**Shipped version:** 3.4.0~ynh3 +**Shipped version:** 4.1.1~ynh1 **Demo:** diff --git a/README_es.md b/README_es.md index 83d6702..e6b6f23 100644 --- a/README_es.md +++ b/README_es.md @@ -18,7 +18,7 @@ No se debe editar a mano. Collaborative maps and routing with a straightforward interface -**Versión actual:** 3.4.0~ynh3 +**Versión actual:** 4.1.1~ynh1 **Demo:** diff --git a/README_eu.md b/README_eu.md index 2806729..55c49b0 100644 --- a/README_eu.md +++ b/README_eu.md @@ -18,7 +18,7 @@ EZ editatu eskuz. Collaborative maps and routing with a straightforward interface -**Paketatutako bertsioa:** 3.4.0~ynh3 +**Paketatutako bertsioa:** 4.1.1~ynh1 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 7d5d307..81c18d8 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main. Cartes et itinéraires collaboratifs avec une interface simple. -**Version incluse :** 3.4.0~ynh3 +**Version incluse :** 4.1.1~ynh1 **Démo :** diff --git a/README_gl.md b/README_gl.md index 1389f1c..a86b75f 100644 --- a/README_gl.md +++ b/README_gl.md @@ -18,7 +18,7 @@ NON debe editarse manualmente. Collaborative maps and routing with a straightforward interface -**Versión proporcionada:** 3.4.0~ynh3 +**Versión proporcionada:** 4.1.1~ynh1 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index d8bf605..124912f 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -18,7 +18,7 @@ Collaborative maps and routing with a straightforward interface -**分发版本:** 3.4.0~ynh3 +**分发版本:** 4.1.1~ynh1 **演示:** From 601aab7c369dfc95c5f3de17582367a101ac0c22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 8 Jun 2024 18:39:56 +0200 Subject: [PATCH 08/15] Update systemd.service --- conf/systemd.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/systemd.service b/conf/systemd.service index 7c0c215..40d306e 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -11,7 +11,7 @@ Environment=DOTENV_CONFIG_PATH=__INSTALL_DIR__/etc/facilmap.env Environment="__YNH_NODE_LOAD_PATH__" #ExecStart=__INSTALL_DIR__/bin/facilmap-server WorkingDirectory=__INSTALL_DIR__/server -ExecStart=/usr/bin/yarn serve +ExecStart=/usr/bin/yarn server StandardOutput=syslog StandardError=syslog SyslogIdentifier=__APP__ From 258b34227267685dce49077f5410d5bce856c5ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 8 Jun 2024 18:56:59 +0200 Subject: [PATCH 09/15] Update install --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index cb86d2c..142c9fc 100755 --- a/scripts/install +++ b/scripts/install @@ -40,8 +40,8 @@ ynh_mysql_execute_as_root --database="$db_name" --sql="ALTER DATABASE $db_name C ynh_script_progression --message="Building with NodeJS..." --weight=20 pushd "$install_dir" - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn build + ynh_exec_warn_less env $ynh_node_load_PATH yarn install + ynh_exec_warn_less env $ynh_node_load_PATH yarn build popd chmod 750 "$install_dir" From 7225c274dbc8d183015abd785e7dd1942380cf93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 8 Jun 2024 19:00:21 +0200 Subject: [PATCH 10/15] cleaning --- conf/systemd.service | 2 +- scripts/install | 7 +++---- scripts/upgrade | 22 ++++++++++++++++------ 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 40d306e..63b460e 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ Type=simple User=__APP__ Group=__APP__ Environment=NODE_ENV=production -Environment=DOTENV_CONFIG_PATH=__INSTALL_DIR__/etc/facilmap.env +Environment=DOTENV_CONFIG_PATH=__INSTALL_DIR__/config.env Environment="__YNH_NODE_LOAD_PATH__" #ExecStart=__INSTALL_DIR__/bin/facilmap-server WorkingDirectory=__INSTALL_DIR__/server diff --git a/scripts/install b/scripts/install index 142c9fc..070b177 100755 --- a/scripts/install +++ b/scripts/install @@ -53,11 +53,10 @@ chown -R "$app:www-data" "$install_dir" #================================================= ynh_script_progression --message="Adding configuration..." --weight=2 -mkdir -p "$install_dir/etc" -ynh_add_config --template="config.env" --destination="$install_dir/etc/facilmap.env" +ynh_add_config --template="config.env" --destination="$install_dir/config.env" -chown -R "$app:www-data" "$install_dir/etc" -chmod 400 "$install_dir/etc/facilmap.env" +chown -R "$app:www-data" "$install_dir/config.env" +chmod 400 "$install_dir/config.env" #================================================= # SYSTEM CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 7c404d7..aeda32f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,6 +25,15 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" +#================================================= +# DOWNLOAD, CHECK AND UNPACK SOURCE +#================================================= +ynh_script_progression --message="Upgrading source files..." --weight=1 + +ynh_setup_source --dest_dir="$install_dir" + +chown -R "$app:www-data" "$install_dir" + #================================================= # SPECIFIC UPGRADE #================================================= @@ -32,8 +41,9 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= ynh_script_progression --message="Install $app..." --weight=20 -pushd $install_dir - ynh_exec_as "$app" "$ynh_node_load_PATH" "$ynh_npm" install --prefix "$install_dir" -g facilmap-server@"$facilmap_version" 2>/dev/null +pushd "$install_dir" + ynh_exec_warn_less env $ynh_node_load_PATH yarn install + ynh_exec_warn_less env $ynh_node_load_PATH yarn build popd chmod 750 "$install_dir" @@ -45,11 +55,10 @@ chown -R "$app:www-data" "$install_dir" #================================================= ynh_script_progression --message="Updating config files..." --weight=2 -mkdir -p "$install_dir/etc" -ynh_add_config --template="config.env" --destination="$install_dir/etc/facilmap.env" +ynh_add_config --template="config.env" --destination="$install_dir/config.env" -chown -R "$app:www-data" "$install_dir/etc" -chmod 400 "$install_dir/etc/facilmap.env" +chown -R "$app:www-data" "$install_dir/config.env" +chmod 400 "$install_dir/config.env" #================================================= # GENERIC FINALIZATION @@ -77,6 +86,7 @@ yunohost service add "$app" --description="Collaborative maps and routing" --log # Use logrotate to manage app-specific logfile(s) ynh_use_logrotate --non-append +s #================================================= # START SYSTEMD SERVICE #================================================= From a778fbff70b8a8479577927fe8322f46e17a3757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 8 Jun 2024 19:03:10 +0200 Subject: [PATCH 11/15] fix --- scripts/install | 1 + scripts/restore | 3 --- scripts/upgrade | 1 + 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 070b177..8a7dba2 100755 --- a/scripts/install +++ b/scripts/install @@ -40,6 +40,7 @@ ynh_mysql_execute_as_root --database="$db_name" --sql="ALTER DATABASE $db_name C ynh_script_progression --message="Building with NodeJS..." --weight=20 pushd "$install_dir" + ynh_use_nodejs ynh_exec_warn_less env $ynh_node_load_PATH yarn install ynh_exec_warn_less env $ynh_node_load_PATH yarn build popd diff --git a/scripts/restore b/scripts/restore index 8dbe94e..9b7a080 100755 --- a/scripts/restore +++ b/scripts/restore @@ -24,8 +24,6 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" -chmod 750 "$install_dir" -chmod -R o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir" #================================================= @@ -33,7 +31,6 @@ chown -R "$app:www-data" "$install_dir" #================================================= ynh_script_progression --message="Restoring the MySQL database..." --weight=1 -# echo "ALTER DATABASE $db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci" ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < ./db.sql #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index aeda32f..478c2d6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -42,6 +42,7 @@ chown -R "$app:www-data" "$install_dir" ynh_script_progression --message="Install $app..." --weight=20 pushd "$install_dir" + ynh_use_nodejs ynh_exec_warn_less env $ynh_node_load_PATH yarn install ynh_exec_warn_less env $ynh_node_load_PATH yarn build popd From 9dd6ca007f398203a4e0fb5476b8ec65a00df64f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 8 Jun 2024 19:03:50 +0200 Subject: [PATCH 12/15] fix --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 8a7dba2..fbfd206 100755 --- a/scripts/install +++ b/scripts/install @@ -37,7 +37,7 @@ ynh_mysql_execute_as_root --database="$db_name" --sql="ALTER DATABASE $db_name C #================================================= # BUILD NODE DEPENDENCIES #================================================= -ynh_script_progression --message="Building with NodeJS..." --weight=20 +ynh_script_progression --message="Building with NodeJS..." --weight=10 pushd "$install_dir" ynh_use_nodejs diff --git a/scripts/upgrade b/scripts/upgrade index 478c2d6..f94c683 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -39,7 +39,7 @@ chown -R "$app:www-data" "$install_dir" #================================================= # BUILD NODE DEPENDENCIES #================================================= -ynh_script_progression --message="Install $app..." --weight=20 +ynh_script_progression --message="Install $app..." --weight=10 pushd "$install_dir" ynh_use_nodejs From 4d3df4254b68236471a222071401f3a430bf52a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 8 Jun 2024 19:19:57 +0200 Subject: [PATCH 13/15] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index fbfd206..6f70cab 100755 --- a/scripts/install +++ b/scripts/install @@ -37,7 +37,7 @@ ynh_mysql_execute_as_root --database="$db_name" --sql="ALTER DATABASE $db_name C #================================================= # BUILD NODE DEPENDENCIES #================================================= -ynh_script_progression --message="Building with NodeJS..." --weight=10 +ynh_script_progression --message="Building $app..." --weight=10 pushd "$install_dir" ynh_use_nodejs From c1f0c5a1b1dcbe23d7a3e3366cbe3b91075b5403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 8 Jun 2024 19:23:41 +0200 Subject: [PATCH 14/15] cleaning --- conf/systemd.service | 1 - manifest.toml | 6 +++--- scripts/_common.sh | 2 -- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 63b460e..8c8645d 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -9,7 +9,6 @@ Group=__APP__ Environment=NODE_ENV=production Environment=DOTENV_CONFIG_PATH=__INSTALL_DIR__/config.env Environment="__YNH_NODE_LOAD_PATH__" -#ExecStart=__INSTALL_DIR__/bin/facilmap-server WorkingDirectory=__INSTALL_DIR__/server ExecStart=/usr/bin/yarn server StandardOutput=syslog diff --git a/manifest.toml b/manifest.toml index b169147..23849ca 100644 --- a/manifest.toml +++ b/manifest.toml @@ -28,9 +28,9 @@ ldap = false sso = false -disk = "50M" -ram.build = "50M" -ram.runtime = "50M" +disk = "1000M" +ram.build = "2000M" +ram.runtime = "450M" [install] [install.domain] diff --git a/scripts/_common.sh b/scripts/_common.sh index 66db614..44277c5 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,8 +6,6 @@ nodejs_version=20 -facilmap_version=4.1.1 - #================================================= # PERSONAL HELPERS #================================================= From 9646414fa7e85c78962714b6dd58777ecb2f8a26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 8 Jun 2024 19:54:15 +0200 Subject: [PATCH 15/15] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index f94c683..6170772 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -87,7 +87,7 @@ yunohost service add "$app" --description="Collaborative maps and routing" --log # Use logrotate to manage app-specific logfile(s) ynh_use_logrotate --non-append -s + #================================================= # START SYSTEMD SERVICE #=================================================