diff --git a/deployer/roles/build/tasks/synapse.yml b/deployer/roles/build/tasks/synapse.yml index bdfda82..b21c386 100644 --- a/deployer/roles/build/tasks/synapse.yml +++ b/deployer/roles/build/tasks/synapse.yml @@ -62,17 +62,19 @@ ufw: direction: in from_ip: any - to_port: {{ site.coturn.listening_port }} + to_port: "{{ site.coturn.listening_port }}" proto: any rule: allow comment: "coturn TCP/UDP" + become: true - - name: "Allow inbound UDP ports {{ site.coturn.min_port }}-{{ site.coturn.max_port }} for coturn un UFW" + - name: "Allow inbound ports {{ site.coturn.min_port }}-{{ site.coturn.max_port }}/UDP for coturn un UFW" ufw: direction: in from_ip: any to_port: "{{ item }}" loop: "{{ range({{ site.coturn.min_port }}, {{ site.coturn.max_port }} + 1)|list }}" + become: true ################# diff --git a/deployer/roles/build/templates/synapse/coturn/turnserver.conf.j2 b/deployer/roles/build/templates/synapse/coturn/turnserver.conf.j2 index 3093235..80cdd6e 100644 --- a/deployer/roles/build/templates/synapse/coturn/turnserver.conf.j2 +++ b/deployer/roles/build/templates/synapse/coturn/turnserver.conf.j2 @@ -47,9 +47,9 @@ user-quota={{ site.coturn.user_quota }} total-quota={{ site.coturn.total_quota }} {% endif %} -{% for ip_range in matrix_coturn_denied_peer_ips %} +{% for ip_range in site.coturn.denied_peer_ips %} denied-peer-ip={{ ip_range }} {% endfor %} -{% for ip_range in matrix_coturn_allowed_peer_ips %} +{% for ip_range in site.coturn.allowed_peer_ips %} allowed-peer-ip={{ ip_range }} {% endfor %} \ No newline at end of file diff --git a/deployer/roles/build/templates/synapse/docker-compose.yml.j2 b/deployer/roles/build/templates/synapse/docker-compose.yml.j2 index 813edd5..705ea84 100644 --- a/deployer/roles/build/templates/synapse/docker-compose.yml.j2 +++ b/deployer/roles/build/templates/synapse/docker-compose.yml.j2 @@ -28,12 +28,11 @@ services: # 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" + source: "{{ sites_path }}/{{ site.slug }}/coturn/turnserver.conf" destination: /etc/coturn/turnserver.conf networks: