computer-playbook/roles/docker-matrix-compose/templates/docker-compose.yml.j2

51 lines
1.6 KiB
Django/Jinja

version: '3.1'
services:
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
synapse:
image: matrixdotorg/synapse:latest
container_name: matrix-synapse
restart: {{docker_restart_policy}}
logging:
driver: journald
volumes:
- synapse_data:/data
- ./homeserver.yaml:/data/homeserver.yaml:ro
- ./{{synapse_domain}}.log.config:/data/{{synapse_domain}}.log.config:ro
- ./registrations:{{registration_file_folder}}
environment:
- SYNAPSE_SERVER_NAME={{synapse_domain}}
- SYNAPSE_REPORT_STATS=no
ports:
- "127.0.0.1:{{synapse_http_port}}:8008"
{% include 'templates/docker-container-depends-on-just-database.yml.j2' %}
{% include 'templates/docker-container-networks.yml.j2' %}
element:
image: vectorim/element-web:latest
container_name: matrix-element
restart: {{docker_restart_policy}}
volumes:
- ./element-config.json:/app/config.json
ports:
- "127.0.0.1:{{element_http_port}}:80"
{% include 'templates/docker-container-networks.yml.j2' %}
{% for item in bridges %}
mautrix-{{item.bridge_name}}:
container_name: matrix-{{item.bridge_name}}
image: dock.mau.dev/mautrix/{{ item.bridge_name }}:latest
restart: {{docker_restart_policy}}
volumes:
- ./mautrix/{{item.bridge_name}}:/data
- ./registrations:{{registration_file_folder}}
{% include 'templates/docker-container-networks.yml.j2' %}
{% endfor %}
{% include 'templates/docker-compose-volumes.yml.j2' %}
synapse_data:
{% include 'templates/docker-compose-networks.yml.j2' %}