infrastructure/synapse/docker-compose.yaml

71 lines
2.1 KiB
YAML

version: '3.3'
services:
app:
image: matrixdotorg/synapse:${synapse_version:-latest}
restart: unless-stopped
volumes:
- /media/matrix/matrix_data:/data
- custom_modules:/usr/local/lib/python3.11/site-packages/custom_modules
environment:
- VIRTUAL_HOST=matrix.jfreudenberger.de # the domain where the service should be reached
- VIRTUAL_PORT=8008 # the port the service listens in the container
- LETSENCRYPT_HOST=matrix.jfreudenberger.de # the same domain as VIRTUAL_HOST; this enables ssl
networks:
- server
- webproxy
- synapsenet
postgresql:
image: postgres:${postgres_version:-13}
restart: unless-stopped
environment:
- POSTGRES_PASSWORD=synapse
- POSTGRES_USER=synapse
- POSTGRES_DB=synapse
- POSTGRES_INITDB_ARGS=--encoding='UTF8' --lc-collate='C' --lc-ctype='C'
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- server
sliding-sync-proxy:
image: ghcr.io/matrix-org/sliding-sync:${sliding_sync_version:-latest}
restart: unless-stopped
environment:
- VIRTUAL_HOST=syncv3.matrix.jfreudenberger.de # the domain where the service should be reached
- VIRTUAL_PORT=8008 # the port the service listens in the container
- LETSENCRYPT_HOST=syncv3.matrix.jfreudenberger.de # the same domain as VIRTUAL_HOST; this enables ssl
- SYNCV3_SERVER=https://matrix.jfreudenberger.de
- SYNCV3_DB=postgresql://sliding:sliding@sliding-db:5432/sliding?sslmode=prefer
- SYNCV3_SECRET=${sliding_sync_secret}
networks:
- slidingnet
- webproxy
sliding-db:
image: postgres:${postgres_version:-13}
restart: unless-stopped
environment:
- POSTGRES_PASSWORD=sliding
- POSTGRES_USER=sliding
- POSTGRES_DB=sliding
volumes:
- sliding_postgres_data:/var/lib/postgresql/data
networks:
- slidingnet
volumes:
custom_modules:
postgres_data:
sliding_postgres_data:
networks:
server:
external: false
webproxy:
external: true
synapsenet:
name: synapsenet
slidingnet:
name: slidingnet