Matrix

---

services:
    synapse:
        image: "matrixdotorg/synapse:latest"
        container_name: "synapse"
        restart: unless-stopped
        depends_on:
          - db-matrix
        volumes:
            - "${DATA-SYNAPSE}:/data"
        environment:
            VIRTUAL_HOST: "${URL-SYNAPSE-FQDN}"
            VIRTUAL_PORT: 8008
            SYNAPSE_SERVER_NAME: "${URL-SYNAPSE-FQDN}"
            SYNAPSE_REPORT_STATS: "yes"
        ports:
            - "8008:8008/tcp"
            - "8448:8448/tcp"
    db-matrix:
        image: postgres:16.0
        container_name: db-matrix
        restart: unless-stopped
        environment:
            POSTGRES_PASSWORD: ${PASS-DB-MATRIX}
            POSTGRES_USER: ${USER-DB-MATRIX}
            POSTGRES_DB: synapse
            POSTGRES_INITDB_ARGS: "--encoding='UTF8' --lc-collate='C' --lc-ctype='C'"
        volumes:
            - "${DATA-DB-SYNAPSE}:/var/lib/postgresql/"

    matrix-whatsapp:
      container_name: matrix-whatsapp
      image: dock.mau.dev/mautrix/whatsapp:latest
      restart: unless-stopped
      volumes:
        - ${DATA-WHATSAPP}:/data