automation/deployer/roles/build/templates/synapse/docker-compose.yml.j2
2021-01-17 21:22:35 +01:00

44 lines
1.3 KiB
Django/Jinja

version: '3'
# Generated by ansible for site {{ site.url }}
# On network {{ site.subnet_cidr_address }}:
# - site (synapse) at {{ site.subnet_site_ip }}
# Synapse's docker-compose: https://github.com/matrix-org/synapse/blob/master/contrib/docker/docker-compose.yml
services:
site:
image: matrixdotorg/synapse:{{ synapse.version }}
restart: unless-stopped
environment:
- SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
- UID={{ site.user_uid }}
- GID={{ site.user_gid }}
volumes:
- "{{ site_data_path }}:/data"
networks:
net:
ipv4_address: "{{ site.subnet_site_ip }}"
turn:
# We use: https://github.com/instrumentisto/coturn-docker-image
image: instrumentisto/coturn-docker-image:latest
restart: unless-stopped
# We bind directly to host (no proxying the NAT piercer)
# TCP/UDP: {{ site.coturn.listening_port }}
# UDP: {{ site.coturn.min_port }} - {{ site.coturn.max_port }}
network: host
#
volumes:
- type: tmpfs
target: /var/lib/coturn
- type: volume
source: "{{ sites_path }}/{{ site.slug }}/turnserver.conf"
destination: /etc/coturn/turnserver.conf
networks:
net:
ipam:
driver: default
config:
- subnet: "{{ site.subnet_cidr_address }}"