From 6d4c031fb64ecd65b83aaa8564682edffe460a72 Mon Sep 17 00:00:00 2001 From: Luna Date: Sun, 22 Jan 2023 19:44:54 -0300 Subject: [PATCH] add GoToSocial in a draft state does not federate properly see https://gitdab.com/luna/pubtester/issues/3#issuecomment-1728 --- Dockerfile.gotosocial | 5 +++++ docker-compose.yaml | 18 ++++++++++++++++++ files/nginx.conf | 25 +++++++++++++++++++++++++ pleroma_setup.sh | 1 + 4 files changed, 49 insertions(+) create mode 100644 Dockerfile.gotosocial diff --git a/Dockerfile.gotosocial b/Dockerfile.gotosocial new file mode 100644 index 0000000..07be279 --- /dev/null +++ b/Dockerfile.gotosocial @@ -0,0 +1,5 @@ +FROM superseriousbusiness/gotosocial:0.6.0 +USER root +RUN apk add ca-certificates +COPY ./minica.pem /usr/local/share/ca-certificates/minica.crt +RUN update-ca-certificates diff --git a/docker-compose.yaml b/docker-compose.yaml index a140e26..412ec6a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -157,6 +157,22 @@ services: healthcheck: test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"] + gotosocial: + image: pubtester_gotosocial + user: root:root + environment: + GTS_HOST: gts.pubtester.example.net + GTS_DB_TYPE: sqlite + GTS_DB_ADDRESS: /gotosocial/storage/sqlite.db + GTS_LETSENCRYPT_ENABLED: "false" + GTS_LETSENCRYPT_EMAIL_ADDRESS: "" + #GTS_TRUSTED_PROXIES: "172.x.x.x" + ports: + - '127.0.0.1:20720:8080' + volumes: + - ./data/gotosocial/storage:/gotosocial/storage:rw + restart: "always" + # nginx reverse proxy configured for all instances nginx: image: nginx:1.23.1-alpine @@ -165,6 +181,7 @@ services: aliases: - pleroma.pubtester.example.net - pleroma2.pubtester.example.net + - gts.pubtester.example.net volumes: - ./files/nginx.conf:/etc/nginx/nginx.conf:ro - ./pubtester.example.net/cert.pem:/etc/nginx/cert.pem:ro @@ -176,3 +193,4 @@ services: #- mastodon_streaming - pleroma_web - pleroma2_web + - gotosocial diff --git a/files/nginx.conf b/files/nginx.conf index c5f80e7..2c9912b 100644 --- a/files/nginx.conf +++ b/files/nginx.conf @@ -114,4 +114,29 @@ http { } } + server { + listen 80; + listen [::]:80; + listen 443 ssl; + listen [::]:443 ssl; + root /mnt/none; + index index.html index.htm; + + server_name gts.pubtester.example.net; + + absolute_redirect off; + server_name_in_redirect off; + ssl_certificate /etc/nginx/cert.pem; + ssl_certificate_key /etc/nginx/key.pem; + + location / { + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_pass http://gotosocial:8080; + } + } + + } diff --git a/pleroma_setup.sh b/pleroma_setup.sh index 0ec5b76..90893a2 100755 --- a/pleroma_setup.sh +++ b/pleroma_setup.sh @@ -16,3 +16,4 @@ docker-compose down docker buildx build -t pleroma_selfbuilt -f ./Dockerfile.pleroma . docker buildx build -t pleroma_source_selfbuilt -f ./Dockerfile.pleroma-source . +docker buildx build -t pubtester_gotosocial -f ./Dockerfile.gotosocial .