2021-01-19 13:25:15 +00:00
|
|
|
version: '3.4'
|
2020-05-23 09:22:41 +00:00
|
|
|
|
|
|
|
# Generated by ansible for site {{ site.url }}
|
|
|
|
# On network {{ site.subnet_cidr_address }}:
|
|
|
|
# - site (synapse) at {{ site.subnet_site_ip }}
|
|
|
|
|
2020-06-21 19:40:30 +00:00
|
|
|
# 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:
|
2020-06-02 10:54:54 +00:00
|
|
|
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
|
2020-06-02 10:54:54 +00:00
|
|
|
- UID={{ site.user_uid }}
|
|
|
|
- GID={{ site.user_gid }}
|
2020-05-23 09:22:41 +00:00
|
|
|
volumes:
|
2021-01-19 13:25:15 +00:00
|
|
|
- {{ site_data_path }}:/data
|
2020-05-23 09:22:41 +00:00
|
|
|
networks:
|
|
|
|
net:
|
2021-01-19 13:25:15 +00:00
|
|
|
ipv4_address: {{ site.subnet_site_ip }}
|
2021-01-17 13:04:43 +00:00
|
|
|
|
|
|
|
turn:
|
2021-01-17 20:22:35 +00:00
|
|
|
# We use: https://github.com/instrumentisto/coturn-docker-image
|
2021-01-19 13:25:15 +00:00
|
|
|
image: instrumentisto/coturn:latest
|
2021-01-17 13:04:43 +00:00
|
|
|
restart: unless-stopped
|
2021-01-17 20:22:35 +00:00
|
|
|
volumes:
|
|
|
|
- type: tmpfs
|
|
|
|
target: /var/lib/coturn
|
2021-01-19 13:25:15 +00:00
|
|
|
- type: bind
|
|
|
|
source: {{ sites_path }}/{{ site.slug }}/coturn/turnserver.conf
|
|
|
|
target: /etc/coturn/turnserver.conf
|
|
|
|
# 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_mode: host
|
2020-05-23 09:22:41 +00:00
|
|
|
|
|
|
|
networks:
|
|
|
|
net:
|
|
|
|
ipam:
|
|
|
|
driver: default
|
|
|
|
config:
|
|
|
|
- subnet: "{{ site.subnet_cidr_address }}"
|