From 88d40e98237eb72ff141132b465a00eb49dedd66 Mon Sep 17 00:00:00 2001 From: Florent Date: Sat, 25 Nov 2023 15:12:24 +0100 Subject: [PATCH 1/7] Add ability to customize environment variables --- conf/default.env | 2 ++ conf/systemd.service | 1 + config_panel.toml | 4 ---- manifest.toml | 2 +- scripts/install | 4 ++++ scripts/upgrade | 4 ++++ 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/conf/default.env b/conf/default.env index d7502f2..d87e16c 100644 --- a/conf/default.env +++ b/conf/default.env @@ -1,3 +1,5 @@ +# This file is not meant to be edited. +# Please place your environment variables in __DATA_DIR__/custom.env file APP_HOME_URL=https://__DOMAIN__ GRIST_ORG_IN_PATH=true GRIST_SANDBOX_FLAVOR=pyodide diff --git a/conf/systemd.service b/conf/systemd.service index 1c55900..eaa5ef7 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -11,6 +11,7 @@ ExecStart=__INSTALL_DIR__/sandbox/run.sh StandardOutput=journal StandardError=journal EnvironmentFile=__INSTALL_DIR__/default.env +EnvironmentFile=__DATA_DIR__/custom.env Environment="__YNH_NODE_LOAD_PATH__" # Sandboxing options to harden security diff --git a/config_panel.toml b/config_panel.toml index 39aa3d3..d532538 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -11,10 +11,6 @@ name.fr = "Configuration principale" services = ["__APP__"] - ############################################################################ - #### ABOUT SECTIONS - ############################################################################ - [main.customization] name.fr = "Personnalisation de votre instance Grist" diff --git a/manifest.toml b/manifest.toml index b57dd6d..ad9d71a 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Grist" description.en = "Modern relational spreadsheet" description.fr = "Feuille de calcul relationnelle moderne" -version = "1.1.8~ynh1" +version = "1.1.8~ynh2" maintainers = ["fflorent"] diff --git a/scripts/install b/scripts/install index 38b3f5a..3433d51 100755 --- a/scripts/install +++ b/scripts/install @@ -72,10 +72,14 @@ ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db" ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_add_config --template="default.env" --destination="$install_dir/default.env" +ynh_add_config --template="custom.env" --destination="$data_dir/custom.env" chmod 400 "$install_dir/default.env" chown $app:$app "$install_dir/default.env" +chmod 700 "$data_dir/custom.env" +chown $app:$app "$data_dir/custom.env" + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 53f0f2a..150a5e6 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -83,10 +83,14 @@ ynh_use_logrotate --non-append ynh_script_progression --message="Updating a configuration file..." --weight=1 ynh_add_config --template="default.env" --destination="$install_dir/default.env" +ynh_add_config --template="custom.env" --destination="$data_dir/custom.env" chmod 400 "$install_dir/default.env" chown $app:$app "$install_dir/default.env" +chmod 700 "$data_dir/custom.env" +chown $app:$app "$data_dir/custom.env" + #================================================= # START SYSTEMD SERVICE #================================================= From 1bcde244919a64d331f98a8aa2bdd0cce0c83f04 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 25 Nov 2023 14:12:57 +0000 Subject: [PATCH 2/7] 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 acc39c6..571d40b 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ More about the features can be found here: Date: Sat, 2 Dec 2023 10:30:13 +0100 Subject: [PATCH 3/7] Add missing custom.env file --- conf/custom.env | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 conf/custom.env diff --git a/conf/custom.env b/conf/custom.env new file mode 100644 index 0000000..314c6e8 --- /dev/null +++ b/conf/custom.env @@ -0,0 +1,2 @@ +# You can edit this file to set any custom environment variables +# Please refer to this documentation: https://github.com/gristlabs/grist-core/blob/main/README.md#environment-variables From 7b1c5c825c9135ca993eb1e010068ed88c7441db Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 2 Dec 2023 05:16:16 +0100 Subject: [PATCH 4/7] Upgrade to v1.1.9 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index ad9d71a..082678d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Grist" description.en = "Modern relational spreadsheet" description.fr = "Feuille de calcul relationnelle moderne" -version = "1.1.8~ynh2" +version = "1.1.9~ynh1" maintainers = ["fflorent"] @@ -56,8 +56,8 @@ ram.runtime = "150M" [resources.sources] [resources.sources.main] - url = "https://github.com/gristlabs/grist-core/archive/refs/tags/v1.1.8.tar.gz" - sha256 = "b5ffff86808de1d3b30ab800150032d10e67adfde6f007a7c0a0942e73c4a56e" + url = "https://github.com/gristlabs/grist-core/archive/refs/tags/v1.1.9.tar.gz" + sha256 = "1b910a05beccf17d0bfd2d703b2346aa416adca2f791609c40a058f3b184e49f" autoupdate.strategy = "latest_github_tag" From efe94ca1a20cea392bc90a4a7d132b6e3cf415ee Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 2 Dec 2023 04:16:19 +0000 Subject: [PATCH 5/7] 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 571d40b..c659dd1 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ More about the features can be found here: Date: Sat, 2 Dec 2023 11:47:07 +0100 Subject: [PATCH 6/7] Update Description for custom.env --- doc/DESCRIPTION.md | 6 ++++++ doc/DESCRIPTION_fr.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 739111a..b6c730b 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -12,3 +12,9 @@ More about the features can be found here: Date: Sat, 2 Dec 2023 10:47:27 +0000 Subject: [PATCH 7/7] Auto-update README --- README.md | 6 ++++++ README_fr.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/README.md b/README.md index c659dd1..70d1051 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,12 @@ More about the features can be found here: