feat: Add Matrix infrastructure (Synapse + Element Web)

- Synapse homeserver.yaml configuration
- Element Web config.json
- PostgreSQL init script for synapse DB
- Nginx gateway configuration
- Docker Compose for Matrix stack
- README_MATRIX.md documentation
This commit is contained in:
Apple
2025-11-26 11:56:39 -08:00
parent 5aaf6cbf21
commit 557bfb5ee1
7 changed files with 489 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
-- Matrix Synapse PostgreSQL initialization
-- Run this on the existing dagi-postgres instance
-- Create synapse database
CREATE DATABASE synapse
ENCODING 'UTF8'
LC_COLLATE='C'
LC_CTYPE='C'
template=template0;
-- Create synapse user (password should be set via env variable)
CREATE USER synapse WITH ENCRYPTED PASSWORD 'CHANGE_ME_IN_PRODUCTION';
-- Grant privileges
GRANT ALL PRIVILEGES ON DATABASE synapse TO synapse;
-- Connect to synapse database and set up extensions
\c synapse
-- Required extensions for Synapse
CREATE EXTENSION IF NOT EXISTS pg_trgm;
-- Grant schema permissions
GRANT ALL ON SCHEMA public TO synapse;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TABLES TO synapse;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON SEQUENCES TO synapse;