version: '3.7' services: synapse: image: docker.io/matrixdotorg/synapse:latest restart: unless-stopped environment: - SYNAPSE_CONFIG_PATH=/data/homeserver.yaml volumes: - /data/synapse/data:/data depends_on: - db ports: - 8008:8008/tcp networks: - synapse-net mautrix-telegram: container_name: mautrix-telegram image: dock.mau.dev/mautrix/telegram:latest restart: unless-stopped depends_on: - db volumes: - /data/synapse/bridges/telegram:/data networks: - synapse-net db: image: docker.io/postgres:12-alpine # Change that password, of course! environment: - POSTGRES_USER=synapse - POSTGRES_PASSWORD=<<< my db password >>> - POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C volumes: - /data/synapse/database:/var/lib/postgresql/data networks: - synapse-net networks: synapse-net: {}