# This compose file is compatible with Compose itself, it might need some # adjustments to run properly with stack. services: synapse: build: context: . dockerfile: Dockerfile container_name: synapse image: docker.io/matrixdotorg/synapse:latest # Since synapse does not retry to connect to the database, restart upon # failure restart: unless-stopped # See the readme for a full documentation of the environment settings # NOTE: You must edit homeserver.yaml to use postgres, it defaults to sqlite environment: - SYNAPSE_CONFIG_PATH=/data/homeserver.yaml - SYNAPSE_SERVER_NAME=nadeko.net - SYNAPSE_REPORT_STATS=no volumes: # You may either store all the files in a local folder - ./synapse_data:/data:rw - ./synapse_data/homeserver.yaml:/data/homeserver.yaml:ro - /var/run/postgresql/:/run/postgresql:rw # .. or you may split this between different storage points # - ./files:/data # - /path/to/ssd:/data/uploads # - /path/to/large_hdd:/data/media # In order to expose Synapse, remove one of the following, you might for # instance expose the TLS port directly: ports: - 10022:8008/tcp - 9183:9183/tcp healthcheck: test: ["CMD", "curl", "-fSs", "http://localhost:8008/health"] interval: 15s timeout: 5s retries: 3 start_period: 5s sliding-sync: image: ghcr.io/matrix-org/sliding-sync:latest container_name: matrix-sliding-sync restart: unless-stopped volumes: - /var/run/postgresql/:/run/postgresql:rw env_file: - path: ./sliding-sync/.env required: true environment: - SYNCV3_SERVER=http://synapse:8008 - SYNCV3_BINDADDR=:8008 - SYNCV3_LOG_LEVEL=debug ports: - 10024:8008 depends_on: - synapse mautrix-telegram: image: dock.mau.dev/mautrix/telegram:latest container_name: mautrix-telegram restart: unless-stopped volumes: - ./mautrix-telegram_data:/data:z - /var/run/postgresql/:/run/postgresql:rw depends_on: - synapse mautrix-whatsapp: image: dock.mau.dev/mautrix/whatsapp:latest container_name: mautrix-whatsapp restart: unless-stopped volumes: - ./mautrix-whatsapp_data:/data:z - /var/run/postgresql/:/run/postgresql:rw depends_on: - synapse element: image: vectorim/element-web:latest container_name: matrix-element restart: unless-stopped volumes: - ./element-web/config.json:/app/config.json:ro ports: - 10023:80/tcp # TODO: Use pgbouncer networks: default: name: synapse