From 0291fd6c16985ee61c90ecd2d15008f7dbe9257d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 12 Sep 2023 21:32:25 +0200 Subject: [PATCH 01/11] Create DESCRIPTION_fr.md --- doc/DESCRIPTION_fr.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/DESCRIPTION_fr.md diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..e50d731 --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1,10 @@ +Homarr est une page d'accueil simple et légère pour votre serveur, qui vous aide à accéder facilement à tous vos services en un seul endroit. +Il s'intègre aux services que vous utilisez pour afficher des informations sur la page d'accueil (par exemple, afficher les prochaines versions de Sonarr/Radar). + +### Caractéristiques + +- S'intègre aux services que vous utilisez. +- Recherchez sur le Web directement depuis votre page d'accueil. +- Indicateur d'état en temps réel pour chaque service. +- Recherche automatiquement les icônes pendant que vous tapez le nom d'un service. +- Des widgets pouvant afficher tous types d'informations. From 5312d3b2670315dae1ab9f768b50606292ff70ef Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 12 Sep 2023 19:32:29 +0000 Subject: [PATCH 02/11] Auto-update README --- README_fr.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/README_fr.md b/README_fr.md index 2e9fa90..b953df5 100644 --- a/README_fr.md +++ b/README_fr.md @@ -16,17 +16,16 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po ## Vue d’ensemble -Homarr is a simple and lightweight homepage for your server, that helps you easily access all of your services in one place. -It integrates with the services you use to display information on the homepage (E.g. Show upcoming Sonarr/Radarr releases). +Homarr est une page d'accueil simple et légère pour votre serveur, qui vous aide à accéder facilement à tous vos services en un seul endroit. +Il s'intègre aux services que vous utilisez pour afficher des informations sur la page d'accueil (par exemple, afficher les prochaines versions de Sonarr/Radar). -### Features +### Caractéristiques -- Integrates with services you use. -- Search the web directly from your homepage. -- Real-time status indicator for every service. -- Automatically finds icons while you type the name of a service. -- Widgets that can display all types of information. -- Very light-weight and fast. +- S'intègre aux services que vous utilisez. +- Recherchez sur le Web directement depuis votre page d'accueil. +- Indicateur d'état en temps réel pour chaque service. +- Recherche automatiquement les icônes pendant que vous tapez le nom d'un service. +- Des widgets pouvant afficher tous types d'informations. **Version incluse :** 0.13.4~ynh1 From 4845df14d73d3595555391fdd2f0ed01574223f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 24 Nov 2023 12:23:14 +0100 Subject: [PATCH 03/11] cleaning --- conf/.env | 0 manifest.toml | 6 +++--- scripts/install | 12 ++++++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 conf/.env diff --git a/conf/.env b/conf/.env new file mode 100644 index 0000000..e69de29 diff --git a/manifest.toml b/manifest.toml index ccc76f4..615510d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Homarr" description.en = "Customizable browser's home page to interact with your homeserver's Docker containers" description.fr = "Page d'accueil personnalisable pour interagir avec les conteneurs Docker de votre serveur" -version = "0.13.4~ynh1" +version = "0.14.2~ynh1" maintainers = ["eric_G"] @@ -37,8 +37,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://github.com/ajnart/homarr/archive/refs/tags/v0.13.4.tar.gz" - sha256 = "bddeecf22f40743ff7446bc8dc8427539788425671147029a33b088aaec5967b" + url = "https://github.com/ajnart/homarr/archive/refs/tags/v0.14.2.tar.gz" + sha256 = "c8e30aaf9ccfd5c5cfa11965cbb7d0c4615c915afca73f19b0b64c8fa3abd327" autoupdate.strategy = "latest_github_tag" [resources.ports] diff --git a/scripts/install b/scripts/install index 50503d8..4b1f104 100755 --- a/scripts/install +++ b/scripts/install @@ -9,6 +9,8 @@ source _common.sh source /usr/share/yunohost/helpers +secret=$(ynh_string_random --length=24) + #================================================= # INSTALL DEPENDENCIES #================================================= @@ -36,6 +38,16 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# ADD A CONFIGURATION +#================================================= +ynh_script_progression --message="Adding a configuration file..." --weight=1 + +ynh_add_config --template=".env" --destination="$install_dir/.env" + +chmod 400 "$install_dir/.env" +chown $app:$app "$install_dir/.env" + #================================================= # INSTALL HOMARR #================================================= From cb03aee17653e5f4bf78f0caff1bb5dbdc67e732 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 24 Nov 2023 11:23:19 +0000 Subject: [PATCH 04/11] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 69acf2b..dad4745 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ It integrates with the services you use to display information on the homepage ( - Very light-weight and fast. -**Shipped version:** 0.13.4~ynh1 +**Shipped version:** 0.14.2~ynh1 **Demo:** https://homarr.ajnart.fr/fr diff --git a/README_fr.md b/README_fr.md index bc76fdd..cbfbf7a 100644 --- a/README_fr.md +++ b/README_fr.md @@ -28,7 +28,7 @@ Il s'intègre aux services que vous utilisez pour afficher des informations sur - Des widgets pouvant afficher tous types d'informations. -**Version incluse :** 0.13.4~ynh1 +**Version incluse :** 0.14.2~ynh1 **Démo :** https://homarr.ajnart.fr/fr From c26ef5a0127aab5b5afc60d4d74e3c62aa793ffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 24 Nov 2023 12:29:01 +0100 Subject: [PATCH 05/11] fix --- conf/.env | 14 ++++++++++++++ manifest.toml | 2 +- scripts/install | 1 + scripts/upgrade | 32 ++++++++++++++++++++++---------- 4 files changed, 38 insertions(+), 11 deletions(-) diff --git a/conf/.env b/conf/.env index e69de29..f3d147d 100644 --- a/conf/.env +++ b/conf/.env @@ -0,0 +1,14 @@ +DATABASE_URL="file:./database/db.sqlite" + +# Next Auth +# You can generate a new secret on the command line with: +# openssl rand -base64 32 +# https://next-auth.js.org/configuration/options#secret +NEXTAUTH_URL="http://127.0.0.1:__PORT__" + +NEXTAUTH_SECRET="__SECRET__" + +# Disable analytics +NEXT_PUBLIC_DISABLE_ANALYTICS="true" + +DEFAULT_COLOR_SCHEME="light" \ No newline at end of file diff --git a/manifest.toml b/manifest.toml index 615510d..dfd938c 100644 --- a/manifest.toml +++ b/manifest.toml @@ -51,7 +51,7 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "" + packages = "sqlite3" 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" diff --git a/scripts/install b/scripts/install index 4b1f104..afb929f 100755 --- a/scripts/install +++ b/scripts/install @@ -57,6 +57,7 @@ pushd $install_dir ynh_use_nodejs ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_ENV=production yarn build + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn db:migrate popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 55f7d22..6379485 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -55,22 +55,34 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 - env_path="$PATH" # Create a dedicated systemd config ynh_add_systemd_config -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - yunohost service add $app --description="Customizable browser's home page" --log="/var/log/$app/$app.log" +#================================================= +# ADD A CONFIGURATION +#================================================= +ynh_script_progression --message="Adding a configuration file..." --weight=1 + +ynh_add_config --template=".env" --destination="$install_dir/.env" + +chmod 400 "$install_dir/.env" +chown $app:$app "$install_dir/.env" + +#================================================= +# INSTALL HOMARR +#================================================= +ynh_script_progression --message="Building the app..." --weight=20 + +pushd $install_dir + ynh_use_nodejs + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_ENV=production yarn build + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn db:migrate +popd + #================================================= # START SYSTEMD SERVICE #================================================= From df89fd98ea02041fc4b9b18efb377953bcd571c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 24 Nov 2023 12:42:25 +0100 Subject: [PATCH 06/11] Update manifest.toml --- manifest.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index dfd938c..f6bf355 100644 --- a/manifest.toml +++ b/manifest.toml @@ -21,10 +21,13 @@ code = "https://github.com/ajnart/homarr" yunohost = ">= 11.2" architectures = "all" multi_instance = true + ldap = false + sso = false + disk = "50M" -ram.build = "50M" +ram.build = "1500M" ram.runtime = "50M" [install] From 2720b8aaaa2f7583d92954f92b8e1341ccdc0be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 24 Nov 2023 12:48:03 +0100 Subject: [PATCH 07/11] cleaning --- conf/.env | 4 +++- scripts/change_url | 4 ++-- scripts/install | 22 ++++++---------------- scripts/restore | 19 +------------------ scripts/upgrade | 4 ++-- 5 files changed, 14 insertions(+), 39 deletions(-) diff --git a/conf/.env b/conf/.env index f3d147d..374ae5e 100644 --- a/conf/.env +++ b/conf/.env @@ -11,4 +11,6 @@ NEXTAUTH_SECRET="__SECRET__" # Disable analytics NEXT_PUBLIC_DISABLE_ANALYTICS="true" -DEFAULT_COLOR_SCHEME="light" \ No newline at end of file +DEFAULT_COLOR_SCHEME="light" + +DOCKER_HOST="unix:///var/run/docker.sock" diff --git a/scripts/change_url b/scripts/change_url index ae914ad..3a9b28d 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -16,7 +16,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF @@ -32,7 +32,7 @@ ynh_change_url_nginx_config #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index afb929f..c651c64 100755 --- a/scripts/install +++ b/scripts/install @@ -38,6 +38,12 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config +env_path="$PATH" +# Create a dedicated systemd config +ynh_add_systemd_config + +yunohost service add $app --description="Customizable browser's home page" --log="/var/log/$app/$app.log" + #================================================= # ADD A CONFIGURATION #================================================= @@ -60,22 +66,6 @@ pushd $install_dir ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn db:migrate popd -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Configuring a systemd service..." --weight=1 - -env_path="$PATH" -# Create a dedicated systemd config -ynh_add_systemd_config - -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - -yunohost service add $app --description="Customizable browser's home page" --log="/var/log/$app/$app.log" - #================================================= # START SYSTEMD SERVICE #================================================= diff --git a/scripts/restore b/scripts/restore index 4e38fef..4c7b6e9 100755 --- a/scripts/restore +++ b/scripts/restore @@ -37,19 +37,9 @@ ynh_script_progression --message="Restoring the NGINX web server configuration.. ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RESTORE SYSTEMD -#================================================= -ynh_script_progression --message="Restoring the systemd configuration..." --weight=1 - ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - yunohost service add $app --description="Customizable browser's home page" --log="/var/log/$app/$app.log" #================================================= @@ -57,14 +47,7 @@ yunohost service add $app --description="Customizable browser's home page" --log #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" - -#================================================= -# GENERIC FINALIZATION -#================================================= -# RELOAD NGINX AND PHP-FPM -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index 6379485..4a3517d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -22,7 +22,7 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -88,7 +88,7 @@ popd #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # END OF SCRIPT From 55c86548b59090b9fe46753a4fa2bb499953fc79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 24 Nov 2023 12:51:43 +0100 Subject: [PATCH 08/11] cleaning --- conf/.env | 4 ++++ conf/systemd.service | 5 +++-- scripts/install | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/conf/.env b/conf/.env index 374ae5e..e1b2de3 100644 --- a/conf/.env +++ b/conf/.env @@ -1,5 +1,7 @@ DATABASE_URL="file:./database/db.sqlite" +PORT="__PORT__" + # Next Auth # You can generate a new secret on the command line with: # openssl rand -base64 32 @@ -14,3 +16,5 @@ NEXT_PUBLIC_DISABLE_ANALYTICS="true" DEFAULT_COLOR_SCHEME="light" DOCKER_HOST="unix:///var/run/docker.sock" + +TZ=__TIMEZONE__ \ No newline at end of file diff --git a/conf/systemd.service b/conf/systemd.service index 8d617b2..ea32725 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,9 +7,10 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ -Environment="PATH=__ENV_PATH__" +Environment="__YNH_NODE_LOAD_PATH__" +#Environment="PATH=__ENV_PATH__" Environment="NODE_ENV=production" -Environment="PORT=__PORT__" +#Environment="PORT=__PORT__" ExecStart=/usr/bin/yarn start Restart=on-failure RestartSec=5 diff --git a/scripts/install b/scripts/install index c651c64..5dcdb81 100755 --- a/scripts/install +++ b/scripts/install @@ -38,7 +38,7 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config -env_path="$PATH" +#env_path="$PATH" # Create a dedicated systemd config ynh_add_systemd_config From 367e4355f0113a93a43c45f6561fa9da979a0559 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 24 Nov 2023 12:53:18 +0100 Subject: [PATCH 09/11] fix --- scripts/install | 1 + scripts/upgrade | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 5dcdb81..8c0528c 100755 --- a/scripts/install +++ b/scripts/install @@ -10,6 +10,7 @@ source _common.sh source /usr/share/yunohost/helpers secret=$(ynh_string_random --length=24) +timezone=$(cat /etc/timezone) #================================================= # INSTALL DEPENDENCIES diff --git a/scripts/upgrade b/scripts/upgrade index 4a3517d..3bf87c0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,6 +9,9 @@ source _common.sh source /usr/share/yunohost/helpers +secret=$(ynh_string_random --length=24) +timezone=$(cat /etc/timezone) + #================================================= # CHECK VERSION #================================================= @@ -33,7 +36,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" + ynh_setup_source --dest_dir="$install_dir" --keep=".env" fi chmod -R o-rwx "$install_dir" @@ -55,7 +58,7 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -env_path="$PATH" +#env_path="$PATH" # Create a dedicated systemd config ynh_add_systemd_config From 9130ddc657bf63b464e7239e742ead0b27f40abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 24 Nov 2023 14:00:36 +0100 Subject: [PATCH 10/11] 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 ea32725..24ff9f3 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,7 +8,7 @@ User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ Environment="__YNH_NODE_LOAD_PATH__" -#Environment="PATH=__ENV_PATH__" +#Environment="PATH=ENV_PATH" Environment="NODE_ENV=production" #Environment="PORT=__PORT__" ExecStart=/usr/bin/yarn start From 8c635b85e22edcc1edf525171cdec9fee51f2015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 24 Nov 2023 14:09:34 +0100 Subject: [PATCH 11/11] cleaning --- conf/.env | 2 -- conf/systemd.service | 5 ++--- scripts/install | 2 +- scripts/upgrade | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/conf/.env b/conf/.env index e1b2de3..fcd1ec9 100644 --- a/conf/.env +++ b/conf/.env @@ -1,7 +1,5 @@ DATABASE_URL="file:./database/db.sqlite" -PORT="__PORT__" - # Next Auth # You can generate a new secret on the command line with: # openssl rand -base64 32 diff --git a/conf/systemd.service b/conf/systemd.service index 24ff9f3..8d617b2 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,10 +7,9 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ -Environment="__YNH_NODE_LOAD_PATH__" -#Environment="PATH=ENV_PATH" +Environment="PATH=__ENV_PATH__" Environment="NODE_ENV=production" -#Environment="PORT=__PORT__" +Environment="PORT=__PORT__" ExecStart=/usr/bin/yarn start Restart=on-failure RestartSec=5 diff --git a/scripts/install b/scripts/install index 8c0528c..e17d956 100755 --- a/scripts/install +++ b/scripts/install @@ -39,7 +39,7 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config -#env_path="$PATH" +env_path="$PATH" # Create a dedicated systemd config ynh_add_systemd_config diff --git a/scripts/upgrade b/scripts/upgrade index 3bf87c0..617af86 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -58,7 +58,7 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -#env_path="$PATH" +env_path="$PATH" # Create a dedicated systemd config ynh_add_systemd_config