automation/deployer/roles/build/templates/synapse/docker-compose.yml.j2

44 lines
1.3 KiB
Text
Raw Normal View History

2020-05-23 09:22:41 +00:00
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
2020-05-23 09:22:41 +00:00
services:
site:
image: matrixdotorg/synapse:{{ synapse.version }}
2020-06-01 06:21:27 +00:00
restart: unless-stopped
2020-05-23 09:22:41 +00:00
environment:
2020-06-01 06:21:27 +00:00
- SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
- UID={{ site.user_uid }}
- GID={{ site.user_gid }}
2020-05-23 09:22:41 +00:00
volumes:
- "{{ site_data_path }}:/data"
2020-05-23 09:22:41 +00:00
networks:
net:
ipv4_address: "{{ site.subnet_site_ip }}"
turn:
2021-01-17 20:22:35 +00:00
# We use: https://github.com/instrumentisto/coturn-docker-image
image: instrumentisto/coturn-docker-image:latest
restart: unless-stopped
2021-01-17 20:22:35 +00:00
# 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 }}/coturn/turnserver.conf"
2021-01-17 20:22:35 +00:00
destination: /etc/coturn/turnserver.conf
2020-05-23 09:22:41 +00:00
networks:
net:
ipam:
driver: default
config:
- subnet: "{{ site.subnet_cidr_address }}"