From e9ea0cbb8f90f42478fca4c6543f8f9dd2dd43da Mon Sep 17 00:00:00 2001 From: kev Date: Thu, 9 Feb 2023 11:57:43 +0800 Subject: [PATCH] add synapse --- README.md | 1 + synapse/README.md | 24 ++++++++++++++++++++++++ synapse/docker-compose.yml | 19 +++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 synapse/README.md create mode 100644 synapse/docker-compose.yml diff --git a/README.md b/README.md index 3ce61dc..eb7ef4f 100644 --- a/README.md +++ b/README.md @@ -455,6 +455,7 @@ A collection of delicious docker recipes. - [x] jira - [x] strapi/strapi - [x] amancevice/superset +- [x] matrixdotorg/synapse - [x] syncthing/syncthing - [x] tensorflow - [x] serving diff --git a/synapse/README.md b/synapse/README.md new file mode 100644 index 0000000..32f2566 --- /dev/null +++ b/synapse/README.md @@ -0,0 +1,24 @@ +synapse +======= + +[Synapse][1] is a Matrix homeserver implementation developed by the matrix.org core team. + +```bash +$ docker-compose run --rm synapse bash +>>> cd /data +>>> /start.py generate +>>> grep 'registration_shared_secret' homeserver.yaml +>>> exit + +$ docker-compose up -d + +$ docker-compose exec synapse bash +>>> cd /data +>>> register_new_matrix_user http://localhost:8008 -c homeserver.yaml --help +>>> sed -i '/registration_shared_secret/s/^/#/' homeserver.yaml +>>> exit + +$ docker-compose restart +``` + +[1]: https://matrix-org.github.io/synapse/latest/ diff --git a/synapse/docker-compose.yml b/synapse/docker-compose.yml new file mode 100644 index 0000000..f9fc91d --- /dev/null +++ b/synapse/docker-compose.yml @@ -0,0 +1,19 @@ +version: "3.8" +services: + synapse: + image: matrixdotorg/synapse + ports: + - "8008:8008" + volumes: + - ./data:/data + environment: + - SYNAPSE_SERVER_NAME=matrix.easypi.duckdns.org + - SYNAPSE_HTTP_PORT=8008 + - SYNAPSE_REPORT_STATS=no + - SYNAPSE_DATA_DIR=/data + - SYNAPSE_CONFIG_DIR=/data + - SYNAPSE_CONFIG_PATH=/data/homeserver.yaml + - UID=991 + - GID=991 + - TZ=UTC + restart: unless-stopped