mirror of
https://github.com/YunoHost-Apps/gotosocial_ynh.git
synced 2024-09-03 19:16:06 +02:00
chores v0.3.7
This commit is contained in:
parent
0b6bd7ed6b
commit
b54a7046eb
6 changed files with 135 additions and 16 deletions
|
@ -19,6 +19,7 @@
|
|||
setup_public=1
|
||||
upgrade=1
|
||||
upgrade=1 from_commit=460048e78df8a195b1eca5994a4699079954b312
|
||||
upgrade=1 from_commit=29c7d0df5dd6e3d90070f242b74cce980676cd72
|
||||
backup_restore=1
|
||||
multi_instance=1
|
||||
port_already_use=1
|
||||
|
@ -29,3 +30,5 @@ Notification=none
|
|||
;;; Upgrade options
|
||||
; commit=460048e78df8a195b1eca5994a4699079954b312
|
||||
name=0.2.1~ynh3
|
||||
; commit=29c7d0df5dd6e3d90070f242b74cce980676cd72
|
||||
name=0.3.6~ynh1
|
||||
|
|
|
@ -165,6 +165,27 @@ web-template-base-dir: "./web/template/"
|
|||
# Default: "./web/assets/"
|
||||
web-asset-base-dir: "./web/assets/"
|
||||
|
||||
###########################
|
||||
##### INSTANCE CONFIG #####
|
||||
###########################
|
||||
|
||||
# Config pertaining to instance federation settings, pages to hide/expose, etc.
|
||||
|
||||
# Bool. Allow unauthenticated users to make queries to /api/v1/instance/peers?filter=open in order
|
||||
# to see a list of instances that this instance 'peers' with. Even if set to 'false', then authenticated
|
||||
# users (members of the instance) will still be able to query the endpoint.
|
||||
# Options: [true, false]
|
||||
# Default: false
|
||||
instance-expose-peers: __INSTANCE_EXPOSE_PEERS__
|
||||
|
||||
# Bool. Allow unauthenticated users to make queries to /api/v1/instance/peers?filter=suspended in order
|
||||
# to see a list of instances that this instance blocks/suspends. This will also allow unauthenticated
|
||||
# users to see the list through the web UI. Even if set to 'false', then authenticated users (members
|
||||
# of the instance) will still be able to query the endpoint.
|
||||
# Options: [true, false]
|
||||
# Default: false
|
||||
instance-expose-suspended: __INSTANCE_EXPOSE_SUSPENDED__
|
||||
|
||||
###########################
|
||||
##### ACCOUNTS CONFIG #####
|
||||
###########################
|
||||
|
@ -174,17 +195,17 @@ web-asset-base-dir: "./web/assets/"
|
|||
# Bool. Do we want people to be able to just submit sign up requests, or do we want invite only?
|
||||
# Options: [true, false]
|
||||
# Default: true
|
||||
accounts-registration-open: __REGISTRATION_OPEN__
|
||||
accounts-registration-open: __ACCOUNTS_REGISTRATION_OPEN__
|
||||
|
||||
# Bool. Do sign up requests require approval from an admin/moderator before an account can sign in/use the server?
|
||||
# Options: [true, false]
|
||||
# Default: true
|
||||
accounts-approval-required: __REGISTRATION_APPROVAL__
|
||||
accounts-approval-required: __ACCOUNTS_APPROVAL_REQUIRED__
|
||||
|
||||
# Bool. Are sign up requests required to submit a reason for the request (eg., an explanation of why they want to join the instance)?
|
||||
# Options: [true, false]
|
||||
# Default: true
|
||||
accounts-reason-required: __REGISTRATION_REASON__
|
||||
accounts-reason-required: __ACCOUNTS_REASON_REQUIRED__
|
||||
|
||||
########################
|
||||
##### MEDIA CONFIG #####
|
||||
|
@ -242,6 +263,36 @@ storage-backend: "local"
|
|||
# Default: "/gotosocial/storage"
|
||||
storage-local-base-path: "__DATADIR__"
|
||||
|
||||
# String. API endpoint of the S3 compatible service.
|
||||
# Only required when running with the s3 storage backend.
|
||||
# Examples: ["minio:9000", "s3.nl-ams.scw.cloud", "s3.us-west-002.backblazeb2.com"]
|
||||
# Default: ""
|
||||
storage-s3-endpoint: ""
|
||||
|
||||
# String. Access key part of the S3 credentials.
|
||||
# Consider setting this value using environment variables to avoid leaking it via the config file
|
||||
# Only required when running with the s3 storage backend.
|
||||
# Examples: ["AKIAJSIE27KKMHXI3BJQ","miniouser"]
|
||||
# Default: ""
|
||||
storage-s3-access-key: ""
|
||||
# String. Secret key part of the S3 credentials.
|
||||
# Consider setting this value using environment variables to avoid leaking it via the config file
|
||||
# Only required when running with the s3 storage backend.
|
||||
# Examples: ["5bEYu26084qjSFyclM/f2pz4gviSfoOg+mFwBH39","miniopassword"]
|
||||
# Default: ""
|
||||
storage-s3-secret-key: ""
|
||||
# String. Name of the storage bucket.
|
||||
#
|
||||
# If you have already encoded your bucket name in the storage-s3-endpoint, this
|
||||
# value will be used as a directory containing your data.
|
||||
#
|
||||
# The bucket must exist prior to starting GoToSocial
|
||||
#
|
||||
# Only required when running with the s3 storage backend.
|
||||
# Examples: ["gts","cool-instance"]
|
||||
# Default: ""
|
||||
storage-s3-bucket: ""
|
||||
|
||||
###########################
|
||||
##### STATUSES CONFIG #####
|
||||
###########################
|
||||
|
|
|
@ -165,3 +165,33 @@ default = "6"
|
|||
help.en = "Default: 6. Note that going way higher than the default might break federation."
|
||||
help.fr = "Valeur par défaut : 6. Notez que si vous dépassez la valeur par défaut, vous risquez de compromettre la fédération."
|
||||
type = "number"
|
||||
|
||||
####################
|
||||
#### INSTANCE CONFIG
|
||||
####################
|
||||
|
||||
[gotosocial.instance]
|
||||
|
||||
name = "Instance config"
|
||||
|
||||
help = "Config pertaining to instance federation settings, pages to hide/expose, etc."
|
||||
|
||||
[gotosocial.instance.expose-peers]
|
||||
ask.en = "API: Expose peers?"
|
||||
ask.fr = "API : Exposer les pairs ?"
|
||||
bind = "instance-expose-peers:__FINALPATH__/config.yaml"
|
||||
choices = ["true", "false"]
|
||||
default = "false"
|
||||
help.en = "Allow unauthenticated users to make queries to /api/v1/instance/peers?filter=open in order to see a list of instances that this instance 'peers' with. Even if set to 'false', then authenticated users (members of the instance) will still be able to query the endpoint."
|
||||
help.fr = "Voulez-vous que les gens puissent simplement envoyer des demandes d'inscription, ou voulez-vous qu'iels doivent être invité-e-s ?"
|
||||
type = "select"
|
||||
|
||||
[gotosocial.instance.expose-suspended]
|
||||
ask.en = "API: Expose suspended?"
|
||||
ask.fr = "API : Exposer les instances bloquées ?"
|
||||
bind = "instance-expose-suspended:__FINALPATH__/config.yaml"
|
||||
choices = ["true", "false"]
|
||||
default = "false"
|
||||
help.en = "Allow unauthenticated users to make queries to /api/v1/instance/peers?filter=suspended in order to see a list of instances that this instance blocks/suspends. This will also allow unauthenticated users to see the list through the web UI. Even if set to 'false', then authenticated users (members of the instance) will still be able to query the endpoint."
|
||||
help.fr = "Les demandes d'inscription doivent-elles être approuvées par un-e administrateur-ice/modérateur-ice avant qu'un compte puisse se connecter/utiliser le serveur ?"
|
||||
type = "select"
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"name": "registration_open",
|
||||
"name": "accounts_registration_open",
|
||||
"type": "boolean",
|
||||
"ask": {
|
||||
"en": "Open registration?",
|
||||
|
@ -87,7 +87,7 @@
|
|||
"default": false
|
||||
},
|
||||
{
|
||||
"name": "registration_approval",
|
||||
"name": "accounts_approval_required",
|
||||
"type": "boolean",
|
||||
"ask": {
|
||||
"en": "Registration approval?",
|
||||
|
@ -100,7 +100,7 @@
|
|||
"default": true
|
||||
},
|
||||
{
|
||||
"name": "registration_reason",
|
||||
"name": "accounts_reason_required",
|
||||
"type": "boolean",
|
||||
"ask": {
|
||||
"en": "Request registration reason?",
|
||||
|
@ -114,4 +114,4 @@
|
|||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -37,9 +37,12 @@ password="$YNH_APP_ARG_PASSWORD"
|
|||
|
||||
# Config stuff:
|
||||
|
||||
registration_open=$(convert_bool "$YNH_APP_ARG_REGISTRATION_OPEN")
|
||||
registration_approval=$(convert_bool "$YNH_APP_ARG_REGISTRATION_APPROVAL")
|
||||
registration_reason=$(convert_bool "$YNH_APP_ARG_REGISTRATION_REASON")
|
||||
accounts_registration_open=$(convert_bool "$YNH_APP_ARG_ACCOUNTS_REGISTRATION_OPEN")
|
||||
accounts_approval_required=$(convert_bool "$YNH_APP_ARG_ACCOUNTS_APPROVAL_REQUIRED")
|
||||
accounts_reason_required=$(convert_bool "$YNH_APP_ARG_ACCOUNTS_REASON_REQUIRED")
|
||||
|
||||
instance_expose_peers="false"
|
||||
instance_expose_suspended="false"
|
||||
|
||||
media_image_max_size="2097152"
|
||||
media_video_max_size="10485760"
|
||||
|
@ -80,9 +83,12 @@ ynh_app_setting_set --app="$app" --key=admin --value="$admin"
|
|||
ynh_app_setting_set --app="$app" --key=email --value="$email"
|
||||
ynh_app_setting_set --app="$app" --key=password --value="$password"
|
||||
|
||||
ynh_app_setting_set --app="$app" --key=registration_open --value="$registration_open"
|
||||
ynh_app_setting_set --app="$app" --key=registration_approval --value="$registration_approval"
|
||||
ynh_app_setting_set --app="$app" --key=registration_reason --value="$registration_reason"
|
||||
ynh_app_setting_set --app="$app" --key=accounts_registration_open --value="$accounts_registration_open"
|
||||
ynh_app_setting_set --app="$app" --key=accounts_approval_required --value="$accounts_approval_required"
|
||||
ynh_app_setting_set --app="$app" --key=accounts_reason_required --value="$accounts_reason_required"
|
||||
|
||||
ynh_app_setting_set --app="$app" --key=instance_expose_peers --value="$instance_expose_peers"
|
||||
ynh_app_setting_set --app="$app" --key=instance_expose_suspended --value="$instance_expose_suspended"
|
||||
|
||||
ynh_app_setting_set --app="$app" --key=media_image_max_size --value="$media_image_max_size"
|
||||
ynh_app_setting_set --app="$app" --key=media_video_max_size --value="$media_video_max_size"
|
||||
|
|
|
@ -121,9 +121,38 @@ then
|
|||
ynh_app_setting_set --app="$app" --key=statuses_poll_option_max_chars --value="$statuses_poll_option_max_chars"
|
||||
ynh_app_setting_set --app="$app" --key=statuses_media_max_files --value="$statuses_media_max_files"
|
||||
# registration of converted parameters
|
||||
ynh_app_setting_set --app="$app" --key=statuses_media_max_files --value="$registration_open"
|
||||
ynh_app_setting_set --app="$app" --key=statuses_media_max_files --value="$registration_approval"
|
||||
ynh_app_setting_set --app="$app" --key=statuses_media_max_files --value="$registration_reason"
|
||||
ynh_app_setting_set --app="$app" --key=registration_open --value="$registration_open"
|
||||
ynh_app_setting_set --app="$app" --key=registration_approval --value="$registration_approval"
|
||||
ynh_app_setting_set --app="$app" --key=registration_reason --value="$registration_reason"
|
||||
fi
|
||||
|
||||
# Upgrade from <0.3.7~ynh1:
|
||||
if ynh_compare_current_package_version --comparison lt --version 0.3.7~ynh1 || [ -z "$instance_expose_peers" ]
|
||||
then
|
||||
# declaration of new parameters
|
||||
instance_expose_peers="false"
|
||||
instance_expose_suspended="false"
|
||||
# conversion of old parameters
|
||||
if [ "$accounts_registration_open" = "true" ] || [ "$accounts_registration_open" = "false" ]; then
|
||||
accounts_registration_open=$registration_open
|
||||
accounts_approval_required=$registration_approval
|
||||
accounts_reason_required=$registration_reason
|
||||
else
|
||||
accounts_registration_open="false"
|
||||
accounts_approval_required="true"
|
||||
accounts_reason_required="false"
|
||||
fi
|
||||
# registration of new parameters
|
||||
ynh_app_setting_set --app="$app" --key=instance_expose_peers --value="$instance_expose_peers"
|
||||
ynh_app_setting_set --app="$app" --key=instance_expose_suspended --value="$instance_expose_suspended"
|
||||
# registration of converted parameters
|
||||
ynh_app_setting_set --app="$app" --key=accounts_registration_open --value="$accounts_registration_open"
|
||||
ynh_app_setting_set --app="$app" --key=accounts_approval_required --value="$accounts_approval_required"
|
||||
ynh_app_setting_set --app="$app" --key=accounts_reason_required --value="$accounts_reason_required"
|
||||
# deletion of old parameters
|
||||
ynh_app_setting_delete --app="$app" --key=registration_open
|
||||
ynh_app_setting_delete --app="$app" --key=registration_approval
|
||||
ynh_app_setting_delete --app="$app" --key=registration_reason
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue