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:
27
infra/matrix/postgres/init.sql
Normal file
27
infra/matrix/postgres/init.sql
Normal 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;
|
||||
|
||||
Reference in New Issue
Block a user