2018-02-04 04:55:20 -07:00
|
|
|
# This compose file is compatible with Copose itself, it might need some
|
|
|
|
# adjustments to run properly with stack.
|
|
|
|
|
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
synapse:
|
2018-02-04 07:04:26 -07:00
|
|
|
image: synapse
|
|
|
|
# Since snyapse does not retry to connect to the database, restart upon
|
|
|
|
# failure
|
|
|
|
restart: unless-stopped
|
2018-02-04 04:55:20 -07:00
|
|
|
# See the readme for a full documentation of the environment settings
|
|
|
|
environment:
|
|
|
|
- SYNAPSE_SERVER_NAME=my.matrix.host
|
2018-02-04 07:04:26 -07:00
|
|
|
- SYNAPSE_ENABLE_REGISTRATION=yes
|
2018-02-04 04:55:20 -07:00
|
|
|
volumes:
|
|
|
|
- ./files:/data
|
2018-02-04 07:04:26 -07:00
|
|
|
depends_on:
|
|
|
|
- db
|
2018-02-04 04:55:20 -07:00
|
|
|
# One may either expose ports directly
|
|
|
|
ports:
|
|
|
|
- 8448:8448/tcp
|
|
|
|
# ... or use a reverse proxy, here is an example for traefik
|
|
|
|
labels:
|
|
|
|
- traefik.enable=true
|
|
|
|
- traefik.frontend.rule=Host:my.matrix.Host
|
|
|
|
- traefik.port=8448
|
|
|
|
|
|
|
|
db:
|
|
|
|
image: postgres:latest
|
|
|
|
# Change that password, of course!
|
|
|
|
environment:
|
|
|
|
- POSTGRES_USER=matrix
|
|
|
|
- POSTGRES_PASSWORD=changeme
|
|
|
|
volumes:
|
2018-02-04 07:04:26 -07:00
|
|
|
- ./schemas:/var/lib/postgresql/data
|