1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gotosocial_ynh.git synced 2024-09-03 19:16:06 +02:00

Expose 'account-domain' setting at install

This commit is contained in:
OniriCorpe 2023-02-18 21:48:51 +01:00
parent 269f1943ea
commit 6450b761e0
5 changed files with 21 additions and 2 deletions

View file

@ -65,7 +65,7 @@ host: "__DOMAIN__"
# https://docs.gotosocial.org/installation_guide/advanced/#can-i-host-my-instance-at-fediexampleorg-but-have-just-exampleorg-in-my-username
#
# Default: ""
account-domain: ""
account-domain: "__ACCOUNT_DOMAIN__"
# String. Protocol to use for the server. Only change to http for local testing!
# This should be the protocol part of the URI that your server is actually reachable on. So even if you're

View file

@ -41,7 +41,21 @@
},
{
"name": "domain",
"type": "domain"
"type": "domain",
"example": "gts.example.org"
},
{
"name": "account_domain",
"type": "domain",
"ask": {
"en": "Domain to use when federating profiles.",
"fr": "Domaine à utiliser lors de la fédération des profils."
},
"help": {
"en": "This is useful when you want your server to be at eg., \"gts.example.org\", but you want the domain on accounts to be \"example.org\" because it looks better or is just shorter/easier to remember. ⚠️ WARNING: This cannot be changed after installation, as the main domain parameter.",
"fr": "Cette option est utile lorsque vous souhaitez que votre serveur se trouve à l'adresse \"gts.example.org\", par exemple, mais que vous souhaitez que le domaine des comptes soit \"example.org\" parce que c'est plus joli, plus court ou plus facile à retenir. ⚠️ ATTENTION : Ce paramètre ne peut etre modifié après installation, tout comme le paramètre du domaine principal."
},
"example": "example.org"
},
{
"name": "admin",

View file

@ -29,6 +29,7 @@ app="$YNH_APP_INSTANCE_NAME"
landing_page_user=""
domain="$YNH_APP_ARG_DOMAIN"
account_domain"$YNH_APP_ARG_ACCOUNT_DOMAIN"
path_url="/"
client_max_body_size="100M"
@ -95,6 +96,7 @@ ynh_app_setting_set --app="$app" --key=final_path --value="$final_path"
ynh_app_setting_set --app="$app" --key=landing_page_user --value="$landing_page_user"
ynh_app_setting_set --app="$app" --key=domain --value="$domain"
ynh_app_setting_set --app="$app" --key=account_domain --value="$account_domain"
ynh_app_setting_set --app="$app" --key=path_url --value="$path_url"
ynh_app_setting_set --app="$app" --key=client_max_body_size --value="$client_max_body_size"

View file

@ -33,6 +33,7 @@ final_path=$(ynh_app_setting_get --app="$app" --key=final_path)
landing_page_user=$(ynh_app_setting_get --app="$app" --key=landing_page_user)
domain=$(ynh_app_setting_get --app="$app" --key=domain)
account_domain=$(ynh_app_setting_get --app="$app" --key=account_domain)
port=$(ynh_app_setting_get --app="$app" --key=port)
path_url=$(ynh_app_setting_get --app="$app" --key=path_url)

View file

@ -232,9 +232,11 @@ then
advanced_rate_limit_requests="300"
# declaration of new parameter
instance_expose_suspended_web="false"
account_domain=""
# registration of parameters
ynh_app_setting_set --app="$app" --key=advanced_rate_limit_requests --value="$advanced_rate_limit_requests"
ynh_app_setting_set --app="$app" --key=instance_expose_suspended_web --value="$instance_expose_suspended_web"
ynh_app_setting_set --app="$app" --key=account_domain --value="$account_domain"
fi
#=================================================