From ebd573499d7fe54f209f97ca63f70eab6059fc9f Mon Sep 17 00:00:00 2001 From: Koree Smith Date: Mon, 6 Apr 2026 20:25:40 -0500 Subject: [PATCH] Added files --- .env.example | 11 +++++++++ .gitignore | 4 ++++ docker-compose.yml | 45 +++++++++++++++++++++++++++++++++++++ element-config.json.example | 34 ++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+) create mode 100644 .env.example create mode 100644 .gitignore create mode 100644 docker-compose.yml create mode 100644 element-config.json.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..2691e42 --- /dev/null +++ b/.env.example @@ -0,0 +1,11 @@ +# Postgres +POSTGRES_DB=synapse +POSTGRES_USER=synapse +POSTGRES_PASSWORD=changeme + +# Synapse +SYNAPSE_SERVER_NAME=chat.example.com + +# Element Admin +REACT_APP_SERVER=https://chat.example.com +REACT_APP_REGISTRATION_ENABLED=false diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..302bd91 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +postgres-data/ +synapse-data/ +.env +element-config.json diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..ed8811e --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,45 @@ +version: '3.8' +services: + postgres: + image: postgres:14 + restart: unless-stopped + environment: + POSTGRES_DB: ${POSTGRES_DB} + POSTGRES_USER: ${POSTGRES_USER} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + POSTGRES_INITDB_ARGS: "--encoding=UTF8 --locale=C" + volumes: + - ./postgres-data:/var/lib/postgresql/data + ports: + - "5432:5432" + synapse: + image: matrixdotorg/synapse:latest + restart: unless-stopped + depends_on: + - postgres + environment: + SYNAPSE_SERVER_NAME: ${SYNAPSE_SERVER_NAME} + SYNAPSE_REPORT_STATS: 'yes' + SYNAPSE_NO_TLS: 'true' + volumes: + - ./synapse-data:/data + ports: + - "8008:8008" + element-web: + image: vectorim/element-web:latest + restart: unless-stopped + depends_on: + - synapse + volumes: + - ./element-config.json:/app/config.json + ports: + - "8080:80" + element-admin: + image: awesometechnologies/synapse-admin:latest + container_name: element-admin + ports: + - 8081:80 + environment: + - REACT_APP_SERVER=${REACT_APP_SERVER} + - REACT_APP_REGISTRATION_ENABLED=${REACT_APP_REGISTRATION_ENABLED} + restart: unless-stopped diff --git a/element-config.json.example b/element-config.json.example new file mode 100644 index 0000000..e35a7c0 --- /dev/null +++ b/element-config.json.example @@ -0,0 +1,34 @@ +{ + "default_server_config": { + "m.homeserver": { + "base_url": "https://chat.example.com", + "server_name": "chat.example.com" + } + }, + "disable_custom_urls": true, + "brand": "My Matrix Server", + "showLabsSettings": true, + "voip": { + "stun_servers": [ + { "urls": ["stun:turn.example.com:3478"] } + ], + "turn_servers": [ + { + "urls": [ + "turn:turn.example.com:3478?transport=udp", + "turn:turn.example.com:3478?transport=tcp", + "turns:turn.example.com:5349?transport=tcp" + ], + "secret": "changeme", + "expiry": 86400000 + } + ] + }, + "webrtc": { + "livekit_url": "wss://chat.example.com:7880", + "jwt_url": "https://chat.example.com:8100" + }, + "labs": { + "feature_custom_calls": true + } +}