Browse Source

matrix: add synapse

Guilhem Saurel 6 years ago
parent
commit
619115a8b7
2 changed files with 56 additions and 0 deletions
  1. 21 0
      matrix/README.md
  2. 35 0
      matrix/docker-compose.yml

+ 21 - 0
matrix/README.md

@@ -0,0 +1,21 @@
+# Matrix
+
+https://matrix.org
+
+## Configure
+
+```
+echo POSTGRES_PASSWORD=$(openssl rand -base64 32) >> .env
+echo SYNAPSE_REPORT_STATS=no >> .env
+echo SYNAPSE_ENABLE_REGISTRATION=yes >> .env
+echo SYNAPSE_LOG_LEVEL=INFO >> .env
+echo SYNAPSE_SMTP_PORT=465 >> .env
+echo SYNAPSE_SMTP_HOST=mail.gandi.net >> .env
+echo SYNAPSE_SMTP_USER=dev@oxyta.net >> .env
+echo SYNAPSE_SMTP_PASSWORD=changeme >> .env
+```
+
+## Deploy
+```
+docker-compose up -d
+```

+ 35 - 0
matrix/docker-compose.yml

@@ -0,0 +1,35 @@
+version: "3"
+
+networks:
+  proxytanet:
+    external: true
+
+services:
+  app:
+    image: matrixdotorg/synapse:v0.32.1
+    restart: unless-stopped
+    env_file:
+      - .env
+    environment:
+      - SYNAPSE_SERVER_NAME=matrix.${CHATONS_DOMAIN:-local}
+      - SYNAPSE_NO_TLS=true
+    labels:
+      traefik.enable: "true"
+      traefik.frontend.rule: "Host: matrix.${CHATONS_DOMAIN:-local}, www.matrix.${CHATONS_DOMAIN:-local}"
+      traefik.docker.network: "proxytanet"
+    networks:
+      - proxytanet
+      - default
+    volumes:
+      - ${CHATONS_ROOT_DIR:-/srv/chatons}/matrix/data:/data
+
+  db:
+    image: postgres:10-alpine
+    restart: always
+    env_file:
+      - .env
+    environment:
+      - POSTGRES_USER=synapse
+      - POSTGRES_DB=synapse
+    volumes:
+      - ${CHATONS_ROOT_DIR:-/srv/chatons}/matrix/postgres:/var/lib/postgresql/data