Files
hobbs-iac/compose/hf-pdocker-01/matrix/docker-compose.yml
T

88 lines
2.4 KiB
YAML

services:
synapse:
# 2026-08-20: matrixdotorg repo is abandoned (froze at 1.148.0); upstream is now element-hq.
# Pinned deliberately so the running version is visible in the file - bump manually.
image: ghcr.io/element-hq/synapse:v1.159.0
container_name: synapse
restart: unless-stopped
environment:
- SYNAPSE_SERVER_NAME=mess.hobbs.farm
- SYNAPSE_REPORT_STATS=no
volumes:
# 2026-08-20: moved off NFS -> local NVMe (SQLite locking, Known Issue #16)
- /var/lib/synapse:/data
ports:
- "8008:8008"
networks:
- matrix-internal
mem_limit: 1G
memswap_limit: 1G
healthcheck:
test: ["CMD-SHELL", "curl -fSs http://localhost:8008/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"
wellknown:
image: nginx:alpine
container_name: matrix-wellknown
restart: unless-stopped
volumes:
- /mnt/docker-data/configs/matrix/wellknown:/usr/share/nginx/html/.well-known/matrix:ro
ports:
- "8010:80"
mem_limit: 64M
memswap_limit: 64M
healthcheck:
test: ["CMD-SHELL", "wget -q --spider http://localhost:80/ || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"
synapse-db:
image: postgres:16-alpine
container_name: synapse-db
restart: unless-stopped
environment:
- POSTGRES_USER=synapse
- POSTGRES_PASSWORD=MnLASftPXou9ubOmawmALYwROwgM
- POSTGRES_DB=synapse
# C collation is MANDATORY - Synapse refuses any other
- POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C
volumes:
# LOCAL disk, never NFS (Known Issue #16). No user: 1024:100 - that is an NFS workaround.
- /var/lib/synapse-db:/var/lib/postgresql/data
networks:
- matrix-internal
mem_limit: 512M
memswap_limit: 512M
labels:
- "com.centurylinklabs.watchtower.enable=false"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U synapse -d synapse"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"
networks:
matrix-internal:
driver: bridge