1
0

docker-compose.yml 1.7 KB

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