From cdbbe2fce12525f75dcc40c3886480939d731cdf Mon Sep 17 00:00:00 2001 From: Dan Anglin Date: Fri, 21 Jul 2023 18:54:27 +0100 Subject: [PATCH] chore: upgrade GTS to v0.8.1 and update config --- config | 2 +- magefiles/config.go | 20 ++-- templates/gotosocial/Dockerfile.gotmpl | 2 +- templates/gotosocial/config.yaml.gotmpl | 147 ++++++++++++++++++------ 4 files changed, 122 insertions(+), 49 deletions(-) diff --git a/config b/config index 44b9285..aba4dd7 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit 44b928529d37370f05ef5ab7dc6227b1a533f7bc +Subproject commit aba4dd7fbc0a017c7a588cc7434093a75926cb70 diff --git a/magefiles/config.go b/magefiles/config.go index c5c69ac..aafd12d 100644 --- a/magefiles/config.go +++ b/magefiles/config.go @@ -62,15 +62,17 @@ type forgejoConfig struct { } type gotosocialConfig struct { - Version string `json:"version"` - Name string `json:"name"` - LogLevel string `json:"logLevel"` - LinuxUID int32 `json:"linuxUID"` - Subdomain string `json:"subdomain"` - ContainerIpv4Address string `json:"containerIpv4Address"` - Port int32 `json:"port"` - DataHostDirectory string `json:"dataHostDirectory"` - DataContainerDirectory string `json:"dataContainerDirectory"` + Version string `json:"version"` + Name string `json:"name"` + LogLevel string `json:"logLevel"` + LinuxUID int32 `json:"linuxUID"` + Subdomain string `json:"subdomain"` + ContainerIpv4Address string `json:"containerIpv4Address"` + Port int32 `json:"port"` + DataHostDirectory string `json:"dataHostDirectory"` + DataContainerDirectory string `json:"dataContainerDirectory"` + AccountsRegistrationOpen bool `json:"accountsRegistrationOpen"` + AccountsAllowCustomCss bool `json:"accountsAllowCustomCss"` } type woodpeckerConfig struct { diff --git a/templates/gotosocial/Dockerfile.gotmpl b/templates/gotosocial/Dockerfile.gotmpl index 66a3414..d165871 100644 --- a/templates/gotosocial/Dockerfile.gotmpl +++ b/templates/gotosocial/Dockerfile.gotmpl @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1 -FROM alpine:3.17 +FROM alpine:3.18 WORKDIR /tmp diff --git a/templates/gotosocial/config.yaml.gotmpl b/templates/gotosocial/config.yaml.gotmpl index 1f14d6b..7fd8acc 100644 --- a/templates/gotosocial/config.yaml.gotmpl +++ b/templates/gotosocial/config.yaml.gotmpl @@ -34,6 +34,7 @@ log-db-queries: false # Examples: ["My Application","gotosocial"] # Default: "gotosocial" application-name: "{{ .GoToSocial.Name }}" + # String. The user that will be shown instead of the landing page. if no user is set, the landing page will be shown. # Examples: "admin" # Default: "" @@ -54,6 +55,11 @@ host: "{{ .GoToSocial.Subdomain }}.{{ .RootDomain }}" # to "gts.example.org/.well-known/webfinger" so that GtS can handle them properly. # # You should also redirect requests at "example.org/.well-known/nodeinfo" in the same way. +# +# You should also redirect requests at "example.org/.well-known/host-meta" in the same way. This endpoint +# is used by a number of clients to discover the API endpoint to use when the host and account domain are +# different. +# # An empty string (ie., not set) means that the same value as 'host' will be used. # # DO NOT change this after your server has already run once, or you will break things! @@ -223,63 +229,95 @@ db-sqlite-cache-size: "8MiB" db-sqlite-busy-timeout: "5m" cache: + # Cache configuration options: + # + # max-size = maximum cached objects count + # ttl = cached object lifetime + # sweep-freq = frequency to look for stale cache objects + # (zero will disable cache sweeping) + + ############################# + #### VISIBILITY CACHES ###### + ############################# + # + # Configure Status and account + # visibility cache. + + visibility-max-size: 2000 + visibility-ttl: "30m" + visibility-sweep-freq: "1m" + gts: ########################### #### DATABASE CACHES ###### ########################### # - # Database cache configuration: - # - # Allows configuration of caches used - # when loading GTS models from the database. - # - # max-size = maximum cached objects count - # ttl = cached object lifetime - # sweep-freq = frequency to look for stale cache objects + # Configure GTS database + # model caches. - account-max-size: 100 - account-ttl: "5m" - account-sweep-freq: "10s" + account-max-size: 2000 + account-ttl: "30m" + account-sweep-freq: "1m" block-max-size: 100 - block-ttl: "5m" - block-sweep-freq: "10s" + block-ttl: "30m" + block-sweep-freq: "1m" - domain-block-max-size: 1000 + domain-block-max-size: 2000 domain-block-ttl: "24h" domain-block-sweep-freq: "1m" - emoji-max-size: 500 - emoji-ttl: "5m" - emoji-sweep-freq: "10s" + emoji-max-size: 2000 + emoji-ttl: "30m" + emoji-sweep-freq: "1m" emoji-category-max-size: 100 - emoji-category-ttl: "5m" - emoji-category-sweep-freq: "10s" + emoji-category-ttl: "30m" + emoji-category-sweep-freq: "1m" - mention-max-size: 500 - mention-ttl: "5m" - mention-sweep-freq: "10s" + follow-max-size: 2000 + follow-ttl: "30m" + follow-sweep-freq: "1m" - notification-max-size: 500 - notification-ttl: "5m" - notification-sweep-freq: "10s" + follow-request-max-size: 2000 + follow-request-ttl: "30m" + follow-request-sweep-freq: "1m" + + media-max-size: 1000 + media-ttl: "30m" + media-sweep-freq: "1m" + + mention-max-size: 2000 + mention-ttl: "30m" + mention-sweep-freq: "1m" + + notification-max-size: 1000 + notification-ttl: "30m" + notification-sweep-freq: "1m" report-max-size: 100 - report-ttl: "5m" - report-sweep-freq: "10s" + report-ttl: "30m" + report-sweep-freq: "1m" - status-max-size: 500 - status-ttl: "5m" - status-sweep-freq: "10s" + status-max-size: 2000 + status-ttl: "30m" + status-sweep-freq: "1m" - tombstone-max-size: 100 - tombstone-ttl: "5m" - tombstone-sweep-freq: "10s" + status-fave-max-size: 2000 + status-fave-ttl: "30m" + status-fave-sweep-freq: "1m" - user-max-size: 100 - user-ttl: "5m" - user-sweep-freq: "10s" + tombstone-max-size: 500 + tombstone-ttl: "30m" + tombstone-sweep-freq: "1m" + + user-max-size: 500 + user-ttl: "30m" + user-sweep-freq: "1m" + + webfinger-max-size: 250 + webfinger-ttl: "24h" + webfinger-sweep-freq: "1m" ###################### ##### WEB CONFIG ##### @@ -353,7 +391,7 @@ instance-deliver-to-shared-inboxes: true # 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: false +accounts-registration-open: {{ .GoToSocial.AccountsRegistrationOpen }} # Bool. Do sign up requests require approval from an admin/moderator before an account can sign in/use the server? # Options: [true, false] @@ -379,7 +417,7 @@ accounts-reason-required: true # # Options: [true, false] # Default: false -accounts-allow-custom-css: true +accounts-allow-custom-css: {{ .GoToSocial.AccountsAllowCustomCss }} ######################## ##### MEDIA CONFIG ##### @@ -569,6 +607,22 @@ letsencrypt-cert-dir: "/gotosocial/storage/certs" # Default: "" letsencrypt-email-address: "" +############################## +##### MANUAL TLS CONFIG ##### +############################## + +# String. Path to a PEM-encoded file on disk that includes the certificate chain +# and the public key +# Examples: ["/gotosocial/storage/certs/chain.pem"] +# Default: "" +tls-certificate-chain: "" + +# String. Path to a PEM-encoded file on disk containing the private key for the +# associated tls-certificate-chain +# Examples: ["/gotosocial/storage/certs/private.pem"] +# Default: "" +tls-certificate-key: "" + ####################### ##### OIDC CONFIG ##### ####################### @@ -630,6 +684,11 @@ oidc-scopes: # Default: false oidc-link-existing: false +# Array of string. If the returned ID token contains a 'groups' claim that matches one of the +# groups in oidc-admin-groups, then this user will be granted admin rights on the GtS instance +# Default: [] +oidc-admin-groups: [] + ####################### ##### SMTP CONFIG ##### ####################### @@ -665,6 +724,18 @@ smtp-password: "" # Default: "" smtp-from: "" +# Bool. If true, when an email is sent that has multiple recipients, each recipient +# will be included in the To field, so that each recipient can see who else got the +# email, and they can 'reply all' to the other recipients if they want to. +# +# If false, email will be sent to Undisclosed Recipients, and each recipient will not +# be able to see who else received the email. +# +# It might be useful to change this setting to 'true' if you want to be able to discuss +# new moderation reports with other admins by 'replying-all' to the notification email. +# Default: false +smtp-disclose-recipients: false + ######################### ##### SYSLOG CONFIG ##### #########################