2018-02-04 18:18:40 +03:00
|
|
|
# This compose file is compatible with Compose itself, it might need some
|
2018-02-04 14:55:20 +03:00
|
|
|
# adjustments to run properly with stack.
|
|
|
|
|
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
synapse:
|
2018-08-31 15:40:17 +03:00
|
|
|
build:
|
|
|
|
context: ../..
|
|
|
|
dockerfile: docker/Dockerfile
|
2018-02-10 23:59:58 +03:00
|
|
|
image: docker.io/matrixdotorg/synapse:latest
|
2018-08-31 15:40:17 +03:00
|
|
|
# Since synapse does not retry to connect to the database, restart upon
|
2018-02-04 17:04:26 +03:00
|
|
|
# failure
|
|
|
|
restart: unless-stopped
|
2018-02-04 14:55:20 +03:00
|
|
|
# See the readme for a full documentation of the environment settings
|
|
|
|
environment:
|
|
|
|
- SYNAPSE_SERVER_NAME=my.matrix.host
|
2018-02-08 22:41:41 +03:00
|
|
|
- SYNAPSE_REPORT_STATS=no
|
2018-02-04 17:04:26 +03:00
|
|
|
- SYNAPSE_ENABLE_REGISTRATION=yes
|
2018-05-01 21:49:52 +03:00
|
|
|
- SYNAPSE_LOG_LEVEL=INFO
|
2018-02-11 01:57:36 +03:00
|
|
|
- POSTGRES_PASSWORD=changeme
|
2018-02-04 14:55:20 +03:00
|
|
|
volumes:
|
2018-02-08 21:46:11 +03:00
|
|
|
# You may either store all the files in a local folder
|
2018-02-04 14:55:20 +03:00
|
|
|
- ./files:/data
|
2018-02-08 21:46:11 +03: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 17:04:26 +03:00
|
|
|
depends_on:
|
|
|
|
- db
|
2018-02-04 18:18:40 +03:00
|
|
|
# In order to expose Synapse, remove one of the following, you might for
|
|
|
|
# instance expose the TLS port directly:
|
2018-02-04 14:55:20 +03:00
|
|
|
ports:
|
|
|
|
- 8448:8448/tcp
|
2018-02-04 18:18:40 +03:00
|
|
|
# ... or use a reverse proxy, here is an example for traefik:
|
2018-02-04 14:55:20 +03:00
|
|
|
labels:
|
|
|
|
- traefik.enable=true
|
|
|
|
- traefik.frontend.rule=Host:my.matrix.Host
|
2019-01-02 10:38:18 +03:00
|
|
|
- traefik.port=8008
|
2018-02-04 14:55:20 +03:00
|
|
|
|
|
|
|
db:
|
2018-02-09 00:00:43 +03:00
|
|
|
image: docker.io/postgres:10-alpine
|
2018-02-04 14:55:20 +03:00
|
|
|
# Change that password, of course!
|
|
|
|
environment:
|
2018-02-08 22:42:57 +03:00
|
|
|
- POSTGRES_USER=synapse
|
2018-02-04 14:55:20 +03:00
|
|
|
- POSTGRES_PASSWORD=changeme
|
|
|
|
volumes:
|
2018-02-08 21:46:11 +03:00
|
|
|
# You may store the database tables in a local folder..
|
2018-02-04 17:04:26 +03:00
|
|
|
- ./schemas:/var/lib/postgresql/data
|
2018-02-08 21:46:11 +03:00
|
|
|
# .. or store them on some high performance storage for better results
|
2018-10-31 17:46:47 +03:00
|
|
|
# - /path/to/ssd/storage:/var/lib/postgresql/data
|