1
0

docker-compose.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # This compose file is compatible with Compose itself, it might need some
  2. # adjustments to run properly with stack.
  3. version: '3'
  4. services:
  5. synapse:
  6. image: docker.io/matrixdotorg/synapse:latest
  7. # Since snyapse does not retry to connect to the database, restart upon
  8. # failure
  9. restart: unless-stopped
  10. # See the readme for a full documentation of the environment settings
  11. environment:
  12. - SYNAPSE_SERVER_NAME=my.matrix.host
  13. - SYNAPSE_REPORT_STATS=no
  14. - SYNAPSE_ENABLE_REGISTRATION=yes
  15. - SYNAPSE_LOG_LEVEL=INFO
  16. - POSTGRES_PASSWORD=changeme
  17. volumes:
  18. # You may either store all the files in a local folder
  19. - ./files:/data
  20. # .. or you may split this between different storage points
  21. # - ./files:/data
  22. # - /path/to/ssd:/data/uploads
  23. # - /path/to/large_hdd:/data/media
  24. depends_on:
  25. - db
  26. # In order to expose Synapse, remove one of the following, you might for
  27. # instance expose the TLS port directly:
  28. ports:
  29. - 8448:8448/tcp
  30. # ... or use a reverse proxy, here is an example for traefik:
  31. labels:
  32. - traefik.enable=true
  33. - traefik.frontend.rule=Host:my.matrix.Host
  34. - traefik.port=8448
  35. db:
  36. image: docker.io/postgres:10-alpine
  37. # Change that password, of course!
  38. environment:
  39. - POSTGRES_USER=synapse
  40. - POSTGRES_PASSWORD=changeme
  41. volumes:
  42. # You may store the database tables in a local folder..
  43. - ./schemas:/var/lib/postgresql/data
  44. # .. or store them on some high performance storage for better results
  45. # - /path/to/ssd/storage:/var/lib/postfesql/data