added COTURN server to Synapse

This commit is contained in:
LUXEY Adrien 2021-01-19 14:25:15 +01:00
parent 8d5784f5fd
commit e3a21fce4e
3 changed files with 21 additions and 17 deletions

View file

@ -73,7 +73,11 @@
direction: in direction: in
from_ip: any from_ip: any
to_port: "{{ item }}" to_port: "{{ item }}"
loop: "{{ range({{ site.coturn.min_port }}, {{ site.coturn.max_port }} + 1)|list }}" proto: udp
rule: allow
comment: "coturn UDP"
with_sequence: start="{{ site.coturn.min_port }}" end="{{ site.coturn.max_port }}"
#loop: "{{ range({{ site.coturn.min_port }}, {{ site.coturn.max_port }} + 1)|list }}"
become: true become: true

View file

@ -1,4 +1,4 @@
version: '3' version: '3.4'
# Generated by ansible for site {{ site.url }} # Generated by ansible for site {{ site.url }}
# On network {{ site.subnet_cidr_address }}: # On network {{ site.subnet_cidr_address }}:
@ -15,25 +15,25 @@ services:
- UID={{ site.user_uid }} - UID={{ site.user_uid }}
- GID={{ site.user_gid }} - GID={{ site.user_gid }}
volumes: volumes:
- "{{ site_data_path }}:/data" - {{ site_data_path }}:/data
networks: networks:
net: net:
ipv4_address: "{{ site.subnet_site_ip }}" ipv4_address: {{ site.subnet_site_ip }}
turn: turn:
# We use: https://github.com/instrumentisto/coturn-docker-image # We use: https://github.com/instrumentisto/coturn-docker-image
image: instrumentisto/coturn-docker-image:latest image: instrumentisto/coturn:latest
restart: unless-stopped 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: volumes:
- type: tmpfs - type: tmpfs
target: /var/lib/coturn target: /var/lib/coturn
- type: volume - type: bind
source: "{{ sites_path }}/{{ site.slug }}/coturn/turnserver.conf" source: {{ sites_path }}/{{ site.slug }}/coturn/turnserver.conf
destination: /etc/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
networks: networks:
net: net:

View file

@ -926,7 +926,7 @@ enable_registration_captcha: false
# Enable registration for new users. # Enable registration for new users.
# #
#enable_registration: false enable_registration: true
# Optional account validity configuration. This allows for accounts to be denied # Optional account validity configuration. This allows for accounts to be denied
# any request after a given period. # any request after a given period.
@ -1026,7 +1026,7 @@ account_validity:
# Enable 3PIDs lookup requests to identity servers from this server. # Enable 3PIDs lookup requests to identity servers from this server.
# #
#enable_3pid_lookup: true enable_3pid_lookup: true
# If set, allows registration of standard or admin accounts by anyone who # If set, allows registration of standard or admin accounts by anyone who
# has the shared secret, even if registration is otherwise disabled. # has the shared secret, even if registration is otherwise disabled.
@ -1112,8 +1112,8 @@ account_threepid_delegates:
# as a publicly joinable room when the first user registers for the # as a publicly joinable room when the first user registers for the
# homeserver. This behaviour can be customised with the settings below. # homeserver. This behaviour can be customised with the settings below.
# #
#auto_join_rooms: auto_join_rooms:
# - "#example:example.com" - "#general:zinz.dev"
# Where auto_join_rooms are specified, setting this flag ensures that the # Where auto_join_rooms are specified, setting this flag ensures that the
# the rooms exist by creating them when the first user on the # the rooms exist by creating them when the first user on the
@ -1129,7 +1129,7 @@ account_threepid_delegates:
# Defaults to true. Uncomment the following line to disable automatically # Defaults to true. Uncomment the following line to disable automatically
# creating auto-join rooms. # creating auto-join rooms.
# #
#autocreate_auto_join_rooms: false autocreate_auto_join_rooms: true
# Whether the auto_join_rooms that are auto-created are available via # Whether the auto_join_rooms that are auto-created are available via
# federation. Only has an effect if autocreate_auto_join_rooms is true. # federation. Only has an effect if autocreate_auto_join_rooms is true.