chore: upgrade GTS to v0.11.0 and update config

- Upgrade GoToSocial to v0.11.0
- Template the base web directory
- Template the container's timezone
- Update the configuration template
This commit is contained in:
Dan Anglin 2023-08-15 18:51:39 +01:00
parent 49568d5f15
commit c7b5859ae6
Signed by: dananglin
GPG key ID: 0C1D44CFBEE68638
5 changed files with 40 additions and 113 deletions

2
config

@ -1 +1 @@
Subproject commit 276d7777d1de147baf5c37c3578ef8384a68c63d Subproject commit b8e5646d68ba1cd4f7fa985e202a10a40bcb0815

View file

@ -73,6 +73,8 @@ type gotosocialConfig struct {
AccountsRegistrationOpen bool `json:"accountsRegistrationOpen"` AccountsRegistrationOpen bool `json:"accountsRegistrationOpen"`
AccountsAllowCustomCss bool `json:"accountsAllowCustomCss"` AccountsAllowCustomCss bool `json:"accountsAllowCustomCss"`
LandingPageUser string `json:"landingPageUser"` LandingPageUser string `json:"landingPageUser"`
WebBaseDirectory string `json:"webBaseDirectory"`
TZ string `json:"tz"`
} }
type woodpeckerConfig struct { type woodpeckerConfig struct {

View file

@ -86,6 +86,8 @@ services:
image: "localhost/flow/gotosocial:{{ .GoToSocial.Version }}" image: "localhost/flow/gotosocial:{{ .GoToSocial.Version }}"
build: build:
context: "../gotosocial" context: "../gotosocial"
environment:
TZ: {{ .GoToSocial.TZ }}
expose: expose:
- "{{ .GoToSocial.Port }}" - "{{ .GoToSocial.Port }}"
networks: networks:

View file

@ -11,11 +11,11 @@ RUN --mount=type=bind,source=.,target=/packages \
&& tar xzvf /packages/gotosocial_{{ .GoToSocial.Version }}_linux_amd64.tar.gz \ && tar xzvf /packages/gotosocial_{{ .GoToSocial.Version }}_linux_amd64.tar.gz \
&& tar xzvf /packages/gotosocial_{{ .GoToSocial.Version }}_web-assets.tar.gz \ && tar xzvf /packages/gotosocial_{{ .GoToSocial.Version }}_web-assets.tar.gz \
&& mv /tmp/gotosocial /usr/local/bin/gotosocial \ && mv /tmp/gotosocial /usr/local/bin/gotosocial \
&& mv /tmp/web /flow/gts \ && mv /tmp/web {{ .GoToSocial.WebBaseDirectory }} \
&& cp /packages/entrypoint.sh /usr/local/bin/entrypoint \ && cp /packages/entrypoint.sh /usr/local/bin/entrypoint \
&& cp /packages/config.yaml /flow/gts/config/config.yaml \ && cp /packages/config.yaml /flow/gts/config/config.yaml \
&& cp /packages/assets/images/background.jpg /flow/gts/web/assets/background.jpg \ && cp /packages/assets/images/background.jpg {{ .GoToSocial.WebBaseDirectory }}/assets/background.jpg \
&& cp /packages/assets/fonts/* /flow/gts/web/assets/fonts/ \ && cp /packages/assets/fonts/* {{ .GoToSocial.WebBaseDirectory }}/assets/fonts/ \
&& chown -R {{ .GoToSocial.LinuxUID }}:{{ .FlowGID }} /flow/gts \ && chown -R {{ .GoToSocial.LinuxUID }}:{{ .FlowGID }} /flow/gts \
&& chmod a+x /usr/local/bin/entrypoint \ && chmod a+x /usr/local/bin/entrypoint \
&& rm -rf /tmp/* && rm -rf /tmp/*

View file

@ -193,10 +193,6 @@ db-tls-ca-cert: ""
# #
# If you set the multiplier to less than 1, only one open connection will be used regardless of cpu count. # If you set the multiplier to less than 1, only one open connection will be used regardless of cpu count.
# #
# PLEASE NOTE!!: This setting currently only applies for Postgres. SQLite will always use 1 connection regardless
# of what is set here. This behavior will change in future when we implement better SQLITE_BUSY handling.
# See https://github.com/superseriousbusiness/gotosocial/issues/1407 for more details.
#
# Examples: [16, 8, 10, 2] # Examples: [16, 8, 10, 2]
# Default: 8 # Default: 8
db-max-open-conns-multiplier: 8 db-max-open-conns-multiplier: 8
@ -234,107 +230,13 @@ db-sqlite-cache-size: "8MiB"
db-sqlite-busy-timeout: "30m" db-sqlite-busy-timeout: "30m"
cache: cache:
# Cache configuration options: # cache.memory-target sets a target limit that
# # the application will try to keep it's caches
# max-size = maximum cached objects count # within. This is based on estimated sizes of
# ttl = cached object lifetime # in-memory objects, and so NOT AT ALL EXACT.
# sweep-freq = frequency to look for stale cache objects # Examples: ["100MiB", "200MiB", "500MiB", "1GiB"]
# (zero will disable cache sweeping) # Default: "100MiB"
memory-target: "100MiB"
#############################
#### VISIBILITY CACHES ######
#############################
#
# Configure Status and account
# visibility cache.
visibility-max-size: 2000
visibility-ttl: "30m"
visibility-sweep-freq: "1m"
gts:
###########################
#### DATABASE CACHES ######
###########################
#
# Configure GTS database
# model caches.
account-max-size: 2000
account-ttl: "30m"
account-sweep-freq: "1m"
block-max-size: 1000
block-ttl: "30m"
block-sweep-freq: "1m"
domain-block-max-size: 2000
domain-block-ttl: "24h"
domain-block-sweep-freq: "1m"
emoji-max-size: 2000
emoji-ttl: "30m"
emoji-sweep-freq: "1m"
emoji-category-max-size: 100
emoji-category-ttl: "30m"
emoji-category-sweep-freq: "1m"
follow-max-size: 2000
follow-ttl: "30m"
follow-sweep-freq: "1m"
follow-request-max-size: 2000
follow-request-ttl: "30m"
follow-request-sweep-freq: "1m"
instance-max-size: 2000
instance-ttl: "30m"
instance-sweep-freq: "1m"
list-max-size: 2000
list-ttl: "30m"
list-sweep-freq: "1m"
list-entry-max-size: 2000
list-entry-ttl: "30m"
list-entry-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: "30m"
report-sweep-freq: "1m"
status-max-size: 2000
status-ttl: "30m"
status-sweep-freq: "1m"
status-fave-max-size: 2000
status-fave-ttl: "30m"
status-fave-sweep-freq: "1m"
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: "15m"
###################### ######################
##### WEB CONFIG ##### ##### WEB CONFIG #####
@ -345,12 +247,12 @@ cache:
# String. Directory from which gotosocial will attempt to load html templates (.tmpl files). # String. Directory from which gotosocial will attempt to load html templates (.tmpl files).
# Examples: ["/some/absolute/path/", "./relative/path/", "../../some/weird/path/"] # Examples: ["/some/absolute/path/", "./relative/path/", "../../some/weird/path/"]
# Default: "./web/template/" # Default: "./web/template/"
web-template-base-dir: "/flow/gts/web/template/" web-template-base-dir: "{{ .GoToSocial.WebBaseDirectory }}/template/"
# String. Directory from which gotosocial will attempt to serve static web assets (images, scripts). # String. Directory from which gotosocial will attempt to serve static web assets (images, scripts).
# Examples: ["/some/absolute/path/", "./relative/path/", "../../some/weird/path/"] # Examples: ["/some/absolute/path/", "./relative/path/", "../../some/weird/path/"]
# Default: "./web/assets/" # Default: "./web/assets/"
web-asset-base-dir: "/flow/gts/web/assets/" web-asset-base-dir: "{{ .GoToSocial.WebBaseDirectory }}/assets/"
########################### ###########################
##### INSTANCE CONFIG ##### ##### INSTANCE CONFIG #####
@ -399,6 +301,15 @@ instance-expose-public-timeline: false
# Default: true # Default: true
instance-deliver-to-shared-inboxes: true instance-deliver-to-shared-inboxes: true
# Bool. This flag will inject a Mastodon version into the version field that
# is included in /api/v1/instance. This version is often used by Mastodon clients
# to do API feature detection. By injecting a Mastodon compatible version, it is
# possible to cajole those clients to behave correctly with GoToSocial.
#
# Options: [true, false]
# Default: false
instance-inject-mastodon-version: false
########################### ###########################
##### ACCOUNTS CONFIG ##### ##### ACCOUNTS CONFIG #####
########################### ###########################
@ -477,8 +388,8 @@ media-description-max-chars: 500
# #
# If this is set to 0, then media from remote instances will be cached indefinitely. # If this is set to 0, then media from remote instances will be cached indefinitely.
# Examples: [30, 60, 7, 0] # Examples: [30, 60, 7, 0]
# Default: 30 # Default: 7
media-remote-cache-days: 30 media-remote-cache-days: 7
# Int. Max size in bytes of emojis uploaded to this instance via the admin API. # Int. Max size in bytes of emojis uploaded to this instance via the admin API.
# The default is the same as the Mastodon size limit for emojis (50kb), which allows # The default is the same as the Mastodon size limit for emojis (50kb), which allows
@ -870,6 +781,18 @@ http-client:
allow-ips: [] allow-ips: []
block-ips: [] block-ips: []
# Bool. Disable verification of TLS certificates of remote servers.
# With this set to 'true', GoToSocial will not error when a remote
# server presents an invalid or self-signed certificate.
#
# THIS SETTING SHOULD BE USED FOR TESTING ONLY! IF YOU TURN THIS
# ON WHILE RUNNING IN PRODUCTION YOU ARE LEAVING YOUR SERVER WIDE
# OPEN TO MAN IN THE MIDDLE ATTACKS! DO NOT CHANGE THIS SETTING
# UNLESS YOU KNOW EXACTLY WHAT YOU'RE DOING AND WHY YOU'RE DOING IT.
#
# Default: false
tls-insecure-skip-verify: false
############################# #############################
##### ADVANCED SETTINGS ##### ##### ADVANCED SETTINGS #####
############################# #############################