1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/grist_ynh.git synced 2024-09-03 20:36:18 +02:00

Add ability to customize environment variables

This commit is contained in:
Florent 2023-11-25 15:12:24 +01:00
parent 24cf94dc44
commit 88d40e9823
6 changed files with 12 additions and 5 deletions

View file

@ -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__ APP_HOME_URL=https://__DOMAIN__
GRIST_ORG_IN_PATH=true GRIST_ORG_IN_PATH=true
GRIST_SANDBOX_FLAVOR=pyodide GRIST_SANDBOX_FLAVOR=pyodide

View file

@ -11,6 +11,7 @@ ExecStart=__INSTALL_DIR__/sandbox/run.sh
StandardOutput=journal StandardOutput=journal
StandardError=journal StandardError=journal
EnvironmentFile=__INSTALL_DIR__/default.env EnvironmentFile=__INSTALL_DIR__/default.env
EnvironmentFile=__DATA_DIR__/custom.env
Environment="__YNH_NODE_LOAD_PATH__" Environment="__YNH_NODE_LOAD_PATH__"
# Sandboxing options to harden security # Sandboxing options to harden security

View file

@ -11,10 +11,6 @@ name.fr = "Configuration principale"
services = ["__APP__"] services = ["__APP__"]
############################################################################
#### ABOUT SECTIONS
############################################################################
[main.customization] [main.customization]
name.fr = "Personnalisation de votre instance Grist" name.fr = "Personnalisation de votre instance Grist"

View file

@ -7,7 +7,7 @@ name = "Grist"
description.en = "Modern relational spreadsheet" description.en = "Modern relational spreadsheet"
description.fr = "Feuille de calcul relationnelle moderne" description.fr = "Feuille de calcul relationnelle moderne"
version = "1.1.8~ynh1" version = "1.1.8~ynh2"
maintainers = ["fflorent"] maintainers = ["fflorent"]

View file

@ -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_script_progression --message="Adding a configuration file..." --weight=1
ynh_add_config --template="default.env" --destination="$install_dir/default.env" 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" chmod 400 "$install_dir/default.env"
chown $app:$app "$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 # GENERIC FINALIZATION
#================================================= #=================================================

View file

@ -83,10 +83,14 @@ ynh_use_logrotate --non-append
ynh_script_progression --message="Updating a configuration file..." --weight=1 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="default.env" --destination="$install_dir/default.env"
ynh_add_config --template="custom.env" --destination="$data_dir/custom.env"
chmod 400 "$install_dir/default.env" chmod 400 "$install_dir/default.env"
chown $app:$app "$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 # START SYSTEMD SERVICE
#================================================= #=================================================