Feat: Matrix Server

This commit is contained in:
coolnsx
2024-07-15 12:35:05 +05:30
parent 8535b53130
commit 2958416e1f
4 changed files with 61 additions and 3 deletions

View File

@@ -7,13 +7,13 @@ services:
environment:
- USER_UID=1001
- USER_GID=1001
- DISABLE_REGISTRATION=True
- DISABLE_REGISTRATION=true
volumes:
- ./gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "2222:22"
#ports:
# - "2222:22"
restart: unless-stopped
networks:
- nginx_proxy

48
matrix/docker-compose.yml Normal file
View File

@@ -0,0 +1,48 @@
services:
postgres:
container_name: postgres
image: postgres:15-alpine
restart: unless-stopped
volumes:
- $DATABASE_DIR:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
- POSTGRES_USER=$POSTGRES_USER
- POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C
networks:
- nginx_proxy
synapse:
container_name: synapse
image: matrixdotorg/synapse:latest
restart: unless-stopped
environment:
- SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
- SYNAPSE_SERVER_NAME=$SYNAPSE_SERVER_NAME
- SYNAPSE_REPORT_STATS=yes
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
- POSTGRES_USER=$POSTGRES_USER
- POSTGRES_DB=$POSTGRES_DATABASE
- POSTGRES_HOST=postgres
- UID=$PUID
- GID=$PGID
- TZ=$TZ
networks:
- nginx_proxy
volumes:
- ./synapse:/data
depends_on:
- postgres
element:
container_name: element
image: vectorim/element-web:latest
restart: unless-stopped
volumes:
- $ELEMENT_CONFIG_JSON:/app/config.json
networks:
- nginx_proxy
networks:
nginx_proxy:
external: true

9
matrix/env.example Normal file
View File

@@ -0,0 +1,9 @@
POSTGRES_USER="synapse"
POSTGRES_DATABASE="synapse"
POSTGRES_PASSWORD=""
PUID=1000
PGID=1000
DATABASE_DIR="./database"
ELEMENT_CONFIG_JSON="./element-config.json"
TZ=etc/UTC
SYNAPSE_SERVER_NAME=example.com

View File

@@ -7,6 +7,7 @@ services:
- '80:80'
- '81:81'
- '443:443'
- '2222:2222'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt