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:
parent
24cf94dc44
commit
88d40e9823
6 changed files with 12 additions and 5 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"]
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -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
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue