updated compose files and added matrix server

This commit is contained in:
2026-08-09 18:04:48 +00:00
parent 031d14c224
commit 546ed488ba
9 changed files with 177 additions and 29 deletions
+66
View File
@@ -0,0 +1,66 @@
services:
synapse:
image: docker.io/matrixdotorg/synapse:sha-7e4588a
container_name: matrix-synapse-server
restart: always
# See the readme for a full documentation of the environment settings
# NOTE: You must edit homeserver.yaml to use postgres, it defaults to sqlite
environment:
- SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
volumes:
- /mnt/raid1/matrix/files:/data
# .. or you may split this between different storage points
# - ./files:/data
# - /path/to/ssd:/data/uploads
# - /path/to/large_hdd:/data/media
depends_on:
- db
networks:
- frontend
- backend
labels:
- traefik.enable=true
- traefik.docker.network=frontend
# =========================
# Client traffic (443)
# =========================
- traefik.http.routers.synapse-client.rule=Host(`${DOMAIN}`) && PathPrefix(`/_matrix`)
- traefik.http.routers.synapse-client.entrypoints=websecure
- traefik.http.routers.synapse-client.tls=true
- traefik.http.routers.synapse-client.tls.certresolver=cloudflare
- traefik.http.routers.synapse-client.service=synapse
- traefik.http.services.synapse.loadbalancer.server.port=8008
# =========================
# Federation traffic (8448)
# =========================
- traefik.http.routers.synapse-federation.rule=Host(`ksan.dev`) && PathPrefix(`/_matrix`)
- traefik.http.routers.synapse-federation.entrypoints=federation
- traefik.http.routers.synapse-federation.tls=true
- traefik.http.routers.synapse-federation.tls.certresolver=cloudflare
- traefik.http.routers.synapse-federation.service=synapse
db:
image: docker.io/postgres:15
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C
networks:
- backend
volumes:
- /mnt/raid1/matrix/db:/var/lib/postgresql/data
restart: always
networks:
frontend:
external: true
backend:
external: true
@@ -0,0 +1,5 @@
{
"m.homeserver": {
"base_url": "https://matrix.ksan.dev"
}
}
@@ -0,0 +1,3 @@
{
"m.server": "ksan.dev:443"
}