services: postgres: hostname: postgres image: postgres:15-alpine restart: unless-stopped volumes: - ./config/postgres:/var/lib/postgresql/data - /etc/localtime:/etc/localtime:ro environment: POSTGRES_PASSWORD: itsasecret POSTGRES_USER: synapse POSTGRES_DATABASE: synapse healthcheck: test: ["CMD-SHELL", "pg_isready -U synapse"] interval: 5s timeout: 5s retries: 5 synapse: hostname: synapse image: ghcr.io/element-hq/synapse:latest ports: - 8008:8008 - 8448:8448 environment: SYNAPSE_CONFIG_PATH: /data/homeserver.yaml volumes: - ./config/synapse:/data - ./config/mautrix-whatsapp:/etc/whatsapp - ./config/mautrix-telegram:/etc/telegram - ./config/mautrix-discord:/etc/discord - /etc/localtime:/etc/localtime:ro depends_on: postgres: condition: service_healthy restart: unless-stopped mautrix-whatsapp: hostname: whatsapp image: dock.mau.dev/mautrix/whatsapp restart: no volumes: - ./config/mautrix-whatsapp:/data - /etc/localtime:/etc/localtime:ro command: ["/usr/bin/mautrix-whatsapp", "--ignore-unsupported-server"] depends_on: postgres: condition: service_healthy healthcheck: test: ["CMD-SHELL", "test -f /data/config.yaml -a -f /data/registration.yaml"] interval: 30s timeout: 10s retries: 1 start_period: 5s mautrix-telegram: hostname: telegram image: dock.mau.dev/mautrix/telegram restart: no volumes: - ./config/mautrix-telegram:/data - /etc/localtime:/etc/localtime:ro depends_on: postgres: condition: service_healthy healthcheck: test: ["CMD-SHELL", "test -f /data/config.yaml -a -f /data/registration.yaml"] interval: 30s timeout: 10s retries: 1 start_period: 5s mautrix-discord: hostname: discord image: dock.mau.dev/mautrix/discord restart: no volumes: - ./config/mautrix-discord:/data - /etc/localtime:/etc/localtime:ro depends_on: postgres: condition: service_healthy healthcheck: test: ["CMD-SHELL", "test -f /data/config.yaml -a -f /data/registration.yaml"] interval: 30s timeout: 10s retries: 1 start_period: 5s