2018-02-04 15:18:40 +00:00
|
|
|
# This compose file is compatible with Compose itself, it might need some
|
2018-02-04 11:55:20 +00:00
|
|
|
# adjustments to run properly with stack.
|
|
|
|
|
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
synapse:
|
2018-02-08 18:46:11 +00:00
|
|
|
image: docker.io/matrixdotorg/synapse:latest
|
2018-02-04 14:04:26 +00:00
|
|
|
# Since snyapse does not retry to connect to the database, restart upon
|
|
|
|
# failure
|
|
|
|
restart: unless-stopped
|
2018-02-04 11:55:20 +00:00
|
|
|
# See the readme for a full documentation of the environment settings
|
|
|
|
environment:
|
|
|
|
- SYNAPSE_SERVER_NAME=my.matrix.host
|
2018-02-08 19:41:41 +00:00
|
|
|
- SYNAPSE_REPORT_STATS=no
|
2018-02-04 14:04:26 +00:00
|
|
|
- SYNAPSE_ENABLE_REGISTRATION=yes
|
2018-02-04 11:55:20 +00:00
|
|
|
volumes:
|
2018-02-08 18:46:11 +00:00
|
|
|
# You may either store all the files in a local folder
|
2018-02-04 11:55:20 +00:00
|
|
|
- ./files:/data
|
2018-02-08 18:46:11 +00:00
|
|
|
# .. or you may split this between different storage points
|
|
|
|
# - ./files:/data
|
|
|
|
# - /path/to/ssd:/data/uploads
|
|
|
|
# - /path/to/large_hdd:/data/media
|
2018-02-04 14:04:26 +00:00
|
|
|
depends_on:
|
|
|
|
- db
|
2018-02-04 15:18:40 +00:00
|
|
|
# In order to expose Synapse, remove one of the following, you might for
|
|
|
|
# instance expose the TLS port directly:
|
2018-02-04 11:55:20 +00:00
|
|
|
ports:
|
|
|
|
- 8448:8448/tcp
|
2018-02-04 15:18:40 +00:00
|
|
|
# ... or use a reverse proxy, here is an example for traefik:
|
2018-02-04 11:55:20 +00:00
|
|
|
labels:
|
|
|
|
- traefik.enable=true
|
|
|
|
- traefik.frontend.rule=Host:my.matrix.Host
|
|
|
|
- traefik.port=8448
|
|
|
|
|
|
|
|
db:
|
2018-02-08 18:46:11 +00:00
|
|
|
image: postgres:10-alpine
|
2018-02-04 11:55:20 +00:00
|
|
|
# Change that password, of course!
|
|
|
|
environment:
|
|
|
|
- POSTGRES_USER=matrix
|
|
|
|
- POSTGRES_PASSWORD=changeme
|
|
|
|
volumes:
|
2018-02-08 18:46:11 +00:00
|
|
|
# You may store the database tables in a local folder..
|
2018-02-04 14:04:26 +00:00
|
|
|
- ./schemas:/var/lib/postgresql/data
|
2018-02-08 18:46:11 +00:00
|
|
|
# .. or store them on some high performance storage for better results
|
|
|
|
# - /path/to/ssd/storage:/var/lib/postfesql/data
|