From 3054c98c5db49cb7b24a1a6b499a19cc39848393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B5=D0=BD=D0=B8=D1=81=20=D0=A8=D0=BA=D0=B0=D0=B1?= =?UTF-8?q?=D0=B0=D1=82=D1=83=D1=80?= Date: Wed, 11 Feb 2026 15:55:19 +0300 Subject: [PATCH] Initial setup: Matrix Synapse + Element Web - docker-compose.yml with Synapse, PostgreSQL 16, Element Web - Element config pointing to chat.dshkabatur.ru - .gitignore for data directories Co-authored-by: Cursor --- .gitignore | 3 +++ docker-compose.yml | 52 +++++++++++++++++++++++++++++++++++++++++++++ element-config.json | 18 ++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 .gitignore create mode 100644 docker-compose.yml create mode 100644 element-config.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8bec36c --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +synapse-data/ +postgres-data/ +*.log diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..72ec12b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,52 @@ +version: '2.4' + +services: + db: + image: postgres:16-alpine + container_name: matrix-db + restart: unless-stopped + volumes: + - ./postgres-data:/var/lib/postgresql/data + environment: + POSTGRES_DB: synapse + POSTGRES_USER: synapse + POSTGRES_PASSWORD: SynapseDB_2026_secure + POSTGRES_INITDB_ARGS: "--encoding=UTF-8 --lc-collate=C --lc-ctype=C" + healthcheck: + test: ["CMD-SHELL", "pg_isready -U synapse"] + interval: 5s + timeout: 5s + retries: 5 + networks: + - matrix + + synapse: + image: matrixdotorg/synapse:latest + container_name: matrix-synapse + restart: unless-stopped + volumes: + - ./synapse-data:/data + ports: + - "127.0.0.1:8008:8008" + depends_on: + db: + condition: service_healthy + environment: + TZ: Europe/Moscow + networks: + - matrix + + element: + image: vectorim/element-web:latest + container_name: matrix-element + restart: unless-stopped + volumes: + - ./element-config.json:/app/config.json:ro + ports: + - "127.0.0.1:3082:80" + networks: + - matrix + +networks: + matrix: + driver: bridge diff --git a/element-config.json b/element-config.json new file mode 100644 index 0000000..0c4a7e0 --- /dev/null +++ b/element-config.json @@ -0,0 +1,18 @@ +{ + "default_server_config": { + "m.homeserver": { + "base_url": "https://chat.dshkabatur.ru", + "server_name": "chat.dshkabatur.ru" + } + }, + "brand": "Dshkabatur Chat", + "default_theme": "dark", + "room_directory": { + "servers": ["chat.dshkabatur.ru"] + }, + "show_labs_settings": false, + "default_country_code": "RU", + "setting_defaults": { + "breadcrumbs": true + } +}