From 9e168165a7907813f18a6624fd9f07270b546549 Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Tue, 12 Apr 2022 11:14:24 +0200 Subject: [PATCH] Updated turn-server configuration. Not functioning yet. --- roles/docker-nextcloud/README.md | 2 ++ roles/docker-turn-server/handlers/main.yml | 8 ++++++++ roles/docker-turn-server/tasks/main.yml | 7 +------ roles/docker-turn-server/templates/turnserver.conf.j2 | 4 ++-- roles/docker-turn-server/vars/main.yml | 1 + 5 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 roles/docker-turn-server/handlers/main.yml create mode 100644 roles/docker-turn-server/vars/main.yml diff --git a/roles/docker-nextcloud/README.md b/roles/docker-nextcloud/README.md index 8e1ca32c..ffbe95c0 100644 --- a/roles/docker-nextcloud/README.md +++ b/roles/docker-nextcloud/README.md @@ -134,3 +134,5 @@ Until NC24 MariaDB version has to be used. - https://unix.stackexchange.com/questions/478855/ansible-docker-container-and-depends-on - https://github.com/gdiepen/docker-convenience-scripts - https://help.nextcloud.com/t/several-issues-after-upgrading-to-nextcloud-21/113118/3 +- https://forum.openmediavault.org/index.php?thread/31782-docker-nextcloud-talk-plugin-and-turnserver/ +- https://help.nextcloud.com/t/nextcloud-talk-im-docker-container-turn-server-auf-docker-host-kein-video/84133/10 diff --git a/roles/docker-turn-server/handlers/main.yml b/roles/docker-turn-server/handlers/main.yml new file mode 100644 index 00000000..420e02f7 --- /dev/null +++ b/roles/docker-turn-server/handlers/main.yml @@ -0,0 +1,8 @@ +--- +- name: recreate turn server + command: + cmd: docker restart -d -p "{{turn_server_listening_port}}:{{turn_server_listening_port}}" -p "{{turn_server_listening_port}}:{{turn_server_listening_port}}/udp" --mount type=tmpfs,destination=/var/lib/coturn --name "turn_server" -v "/home/administrator/volumes/docker/turn-server/turnserver.conf:/etc/coturn/turnserver.conf" coturn/coturn +# -p 49152-65535:49152-65535/udp + environment: + COMPOSE_HTTP_TIMEOUT: 600 + DOCKER_CLIENT_TIMEOUT: 600 diff --git a/roles/docker-turn-server/tasks/main.yml b/roles/docker-turn-server/tasks/main.yml index a06dfb11..7bdf7286 100644 --- a/roles/docker-turn-server/tasks/main.yml +++ b/roles/docker-turn-server/tasks/main.yml @@ -10,9 +10,4 @@ - name: configure turnserver.conf template: src=templates/turnserver.conf.j2 dest=/home/administrator/volumes/docker/turn-server/turnserver.conf - -- name: recreate turn server - command: - cmd: docker run -d -p 3478:3478 -p 3478:3478/udp --name "turn_server" -v "/home/administrator/volumes/docker/turn-server/turnserver.conf:/etc/coturn/turnserver.conf" coturn/coturn -# --mount type=tmpfs,destination=/var/lib/coturn -# -p 49152-65535:49152-65535/udp + notify: recreate turn server diff --git a/roles/docker-turn-server/templates/turnserver.conf.j2 b/roles/docker-turn-server/templates/turnserver.conf.j2 index bb7e0dbb..b1708e96 100644 --- a/roles/docker-turn-server/templates/turnserver.conf.j2 +++ b/roles/docker-turn-server/templates/turnserver.conf.j2 @@ -1,9 +1,9 @@ -listening-port=3478 +listening-port={{turn_server_listening_port}} fingerprint use-auth-secret static-auth-secret={{turn_server_secret}} realm={{turn_server_domain}} -total-quota=100 +total-quota=0 bps-capacity=0 stale-nonce no-multicast-peers diff --git a/roles/docker-turn-server/vars/main.yml b/roles/docker-turn-server/vars/main.yml new file mode 100644 index 00000000..f226d0a7 --- /dev/null +++ b/roles/docker-turn-server/vars/main.yml @@ -0,0 +1 @@ +turn_server_listening_port: 3478