Browse Source

Add synapse app

master-prepare
Luke Childs 3 years ago
parent
commit
c9f0975e76
  1. 22
      apps/registry.json
  2. 0
      apps/synapse/data/synapse/.gitkeep
  3. 25
      apps/synapse/docker-compose.yml
  4. 4
      scripts/configure
  5. 2
      templates/.env-sample
  6. 5
      templates/torrc-sample

22
apps/registry.json

@ -108,6 +108,28 @@
"path": "",
"defaultPassword": "",
"torOnly": false
},
{
"id": "synapse",
"category": "Messaging",
"name": "Synapse",
"version": "1.38.0",
"tagline": "Matrix reference homeserver",
"description": "Synapse is a reference \"homeserver\" implementation of Matrix from the core development team at matrix.org, written in Python/Twisted. It is intended to showcase the concept of Matrix and let folks see the spec in the context of a codebase and let you run your own homeserver and generally help bootstrap the ecosystem.\n\nThe easiest way to try out your new Synapse installation is by connecting to it from a web client.\n\nAn easy way to get started is to install the \"Element\" app on your Umbrel and change its Homeserver URL from matrix.org server to your Synapse's Homeserver URL of http://umbrel.local:8008 (or http://<synapse-tor-hidden-service-url> if you are accessing remotely).\n\nIn Matrix, every user runs one or more Matrix clients, which connect through to a Matrix homeserver. The homeserver stores all their personal chat history and user account information - much as a mail client connects through to an IMAP/SMTP server. Just like email, you can either run your own Matrix homeserver and control and own your own communications and history or use one hosted by someone else (e.g. matrix.org) - there is no single point of control or mandatory service provider in Matrix, unlike WhatsApp, Facebook, Hangouts, etc.",
"developer": "Matrix",
"website": "https://matrix.org",
"dependencies": [],
"repo": "https://github.com/matrix-org/synapse",
"support": "https://matrix.to/#/#synapse:matrix.org",
"port": 8008,
"gallery": [
"1.jpg",
"2.jpg",
"3.jpg"
],
"path": "",
"defaultPassword": "",
"torOnly": false
},
{
"id": "simple-torrent",

0
apps/synapse/data/synapse/.gitkeep

25
apps/synapse/docker-compose.yml

@ -0,0 +1,25 @@
version: "3.7"
services:
server:
image: matrixdotorg/synapse:v1.39.0@sha256:f2cfc838172a3c8c3f3595a637ba465f0d933049ba48b7c7822cec2f0ccc9d80
user: "1000:1000"
restart: on-failure
stop_grace_period: 1m
ports:
- "$APP_SYNAPSE_PORT:$APP_SYNAPSE_PORT"
entrypoint: "bash"
command: "-c './start.py generate && ./start.py migrate_config && exec ./start.py'"
volumes:
- ${APP_DATA_DIR}/data/synapse:/data
environment:
UID: "1000"
GID: "1000"
SYNAPSE_HTTP_PORT: "${APP_SYNAPSE_PORT}"
SYNAPSE_SERVER_NAME: "${APP_HIDDEN_SERVICE}"
SYNAPSE_REPORT_STATS: "yes"
SYNAPSE_ENABLE_REGISTRATION: "yes"
SYNAPSE_NO_TLS: "yes"
networks:
default:
ipv4_address: $APP_SYNAPSE_IP

4
scripts/configure

@ -176,6 +176,8 @@ APP_SIMPLETORRENT_IP="10.21.21.41"
APP_PHOTOPRISM_IP="10.21.21.42"
APP_PHOTOPRISM_PORT="8087"
APP_PHOTOPRISM_DB_IP="10.21.21.43"
APP_SYNAPSE_IP="10.21.21.44"
APP_SYNAPSE_PORT="8008"
# Generate RPC credentials
if [[ -z ${BITCOIN_RPC_USER+x} ]] || [[ -z ${BITCOIN_RPC_PASS+x} ]] || [[ -z ${BITCOIN_RPC_AUTH+x} ]]; then
@ -357,6 +359,8 @@ for template in "${NGINX_CONF_FILE}" "${BITCOIN_CONF_FILE}" "${LND_CONF_FILE}" "
sed -i "s/<app-photoprism-ip>/${APP_PHOTOPRISM_IP}/g" "${template}"
sed -i "s/<app-photoprism-port>/${APP_PHOTOPRISM_PORT}/g" "${template}"
sed -i "s/<app-photoprism-db-ip>/${APP_PHOTOPRISM_DB_IP}/g" "${template}"
sed -i "s/<app-synapse-ip>/${APP_SYNAPSE_IP}/g" "${template}"
sed -i "s/<app-synapse-port>/${APP_SYNAPSE_PORT}/g" "${template}"
done
##########################################################

2
templates/.env-sample

@ -79,3 +79,5 @@ APP_SIMPLETORRENT_IP=<app-simple-torrent-ip>
APP_PHOTOPRISM_IP=<app-photoprism-ip>
APP_PHOTOPRISM_PORT=<app-photoprism-port>
APP_PHOTOPRISM_DB_IP=<app-photoprism-db-ip>
APP_SYNAPSE_IP=<app-synapse-ip>
APP_SYNAPSE_PORT=<app-synapse-port>

5
templates/torrc-sample

@ -110,4 +110,9 @@ HiddenServicePort 22 <app-gitea-ip>:<app-gitea-ssh-port>
HiddenServiceDir /var/lib/tor/app-simple-torrent
HiddenServicePort 80 <app-simple-torrent-ip>:<app-simple-torrent-port>
# synapse Hidden Service
HiddenServiceDir /var/lib/tor/app-synapse
HiddenServicePort 80 <app-synapse-ip>:<app-synapse-port>
HiddenServicePort <app-synapse-port> <app-synapse-ip>:<app-synapse-port>
HashedControlPassword <password>

Loading…
Cancel
Save