summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-10-13 21:51:31 +0200
committerLibravatar GitHub <noreply@github.com>2024-10-13 19:51:31 +0000
commit096767bb3b59b31106bd8fddd27e17cc234caf5a (patch)
treeb5e3d6a0fc7072d782a3a3dafb213a8ee811b668 /example
parent[docs] fix httpsig repo typo (#3426) (diff)
downloadgotosocial-096767bb3b59b31106bd8fddd27e17cc234caf5a.tar.xz
[chore/docs] Add `/gotosocial/.cache` to Docker container, document `GTS_WAZERO_COMPILATION_CACHE` (#3425)
* [chore/docs] Add `/gotosocial/.cache` to Docker container, document `GTS_WAZERO_COMPILATION_CACHE` * update wazero artifact size guesstimate
Diffstat (limited to 'example')
-rw-r--r--example/docker-compose/docker-compose.yaml16
-rw-r--r--example/gotosocial.service9
2 files changed, 25 insertions, 0 deletions
diff --git a/example/docker-compose/docker-compose.yaml b/example/docker-compose/docker-compose.yaml
index fc80348b2..05896d724 100644
--- a/example/docker-compose/docker-compose.yaml
+++ b/example/docker-compose/docker-compose.yaml
@@ -8,11 +8,21 @@ services:
networks:
- gotosocial
environment:
+ # Change this to your actual host value.
GTS_HOST: example.org
GTS_DB_TYPE: sqlite
+ # Path in the GtS Docker container where
+ # the sqlite.db file will be stored.
GTS_DB_ADDRESS: /gotosocial/storage/sqlite.db
+ # Change this to true if you're not running
+ # GoToSocial behind a reverse proxy.
GTS_LETSENCRYPT_ENABLED: "false"
+ # Set your email address here if you
+ # want to receive letsencrypt notices.
GTS_LETSENCRYPT_EMAIL_ADDRESS: ""
+ # Path in the GtS Docker container where the
+ # Wazero compilation cache will be stored.
+ GTS_WAZERO_COMPILATION_CACHE: /gotosocial/.cache
## For reverse proxy setups:
# GTS_TRUSTED_PROXIES: "172.x.x.x"
## Set the timezone of your server:
@@ -24,7 +34,13 @@ services:
## For reverse proxy setups:
#- "127.0.0.1:8080:8080"
volumes:
+ # Your data volume, for your
+ # sqlite.db file and media files.
- ~/gotosocial/data:/gotosocial/storage
+ # OPTIONAL: To mount volume for the WAZERO
+ # compilation cache, for speedier restart
+ # times, uncomment the below line:
+ #- ~/gotosocial/.cache:/gotosocial/.cache
restart: "always"
networks:
diff --git a/example/gotosocial.service b/example/gotosocial.service
index 37a66c66e..b59f6b5a6 100644
--- a/example/gotosocial.service
+++ b/example/gotosocial.service
@@ -13,6 +13,15 @@ Group=gotosocial
Type=exec
Restart=on-failure
+# For speedier restart times, you can uncomment the following Environment line to have GoToSocial cache compiled
+# Wazero artifacts in the given directory between restarts, so that it doesn't need to compile on startup every time.
+#
+# You may need to change the exact path depending on where you've got GoToSocial installed, for example if you've
+# installed at "~/gotosocial" then change the value to "GTS_WAZERO_COMPILATION_CACHE=~/gotosocial/.cache".
+#
+# Whatever you do, make sure the dir exists and that the gotosocial user has permission to write + read from it.
+#Environment="GTS_WAZERO_COMPILATION_CACHE=/gotosocial/.cache"
+
# change if your path to the GoToSocial binary is different
ExecStart=/gotosocial/gotosocial --config-path config.yaml server start
WorkingDirectory=/gotosocial