| 1 | # Matrix Synapse server for local E2E testing |
| 2 | # |
| 3 | # https://hub.docker.com/r/matrixdotorg/synapse |
| 4 | # |
| 5 | # Usage: |
| 6 | # docker compose up -d |
| 7 | # |
| 8 | # After starting, create a test user: |
| 9 | # docker exec synapse register_new_matrix_user -u admin -p admin -a http://localhost:8008 |
| 10 | # |
| 11 | # Default credentials (after creating user): |
| 12 | # Username: admin |
| 13 | # Password: admin |
| 14 | # |
| 15 | # API endpoint: http://localhost:8008 |
| 16 | # Client API: http://localhost:8008/_matrix/client/v3 |
| 17 | |
| 18 | services: |
| 19 | synapse: |
| 20 | image: matrixdotorg/synapse:latest@sha256:18db676dd9f1a053edcf3033a78daeff035b773d58e5bc68802e379947332302 |
| 21 | container_name: synapse |
| 22 | ports: |
| 23 | - 8008:8008 # Client API |
| 24 | - 8448:8448 # Federation API |
| 25 | env_file: |
| 26 | - element.env |
| 27 | volumes: |
| 28 | - ./data:/data |
| 29 | # Run as current host user to avoid permission issues with mounted volumes |
| 30 | # UID/GID are set via environment variables exported in setup.sh |
| 31 | user: "${MATRIX_UID:-1000}:${MATRIX_GID:-1000}" |
| 32 | healthcheck: |
| 33 | test: [ "CMD", "curl", "-f", "http://localhost:8008/_matrix/client/versions" ] |
| 34 | interval: 30s |
| 35 | timeout: 10s |
| 36 | retries: 5 |
| 37 | restart: unless-stopped |