ansible/templates/docker-compose-matrix.yml.j2

49 lines
1.6 KiB
Plaintext
Raw Normal View History

2019-11-21 16:19:03 +00:00
version: '3'
services:
2019-11-28 01:09:17 +00:00
# matrix_synapse_version: "v1.5.1-py3"
2019-11-21 16:19:03 +00:00
# matrix_synapse_version: "v1.5.1"
2019-11-28 01:09:17 +00:00
#matrix_synapse_pg_host: synapse-postgres
2019-11-21 16:19:03 +00:00
synapse:
2019-11-28 01:09:17 +00:00
# build:
# context: ../..
# dockerfile: docker/Dockerfile
image: "matrixdotorg/synapse:{{ matrix_synapse_version }}"
2019-11-21 16:19:03 +00:00
# Since synapse does not retry to connect to the database, restart upon
# failure
restart: unless-stopped
# See the readme for a full documentation of the environment settings
environment:
2019-11-28 01:09:17 +00:00
- SYNAPSE_REPORT_STATS={{ matrix_synapse_report_stats }}
- SYNAPSE_CONFIG_PATH={{ matrix_synapse_config_docker_path }}
2019-11-21 16:19:03 +00:00
volumes:
# You may either store all the files in a local folder
2019-11-28 01:09:17 +00:00
- {{ matrix_synapse_config_dir }}:{{ matrix_synapse_config_docker_dir }}
2019-11-21 16:19:03 +00:00
- ./files:/data
# .. or you may split this between different storage points
# - ./files:/data
# - /path/to/ssd:/data/uploads
# - /path/to/large_hdd:/data/media
depends_on:
- db
# In order to expose Synapse, remove one of the following, you might for
# instance expose the TLS port directly:
ports:
- 8008:8008/tcp
2019-11-28 01:09:17 +00:00
# labels:
2019-11-21 16:19:03 +00:00
db:
image: docker.io/postgres:10-alpine
# Change that password, of course!
environment:
- POSTGRES_USER={{ matrix_synapse_db_name }}
- POSTGRES_PASSWORD={{ matrix_synapse_pg_pass }}
2019-11-21 16:19:03 +00:00
volumes:
# You may store the database tables in a local folder..
- ./schemas:/var/lib/postgresql/data
# .. or store them on some high performance storage for better results
# - /path/to/ssd/storage:/var/lib/postgresql/data