From 512327740ac9dec2956653ff9bc099063ea89dde Mon Sep 17 00:00:00 2001 From: chandi Date: Mon, 9 May 2022 07:24:07 +0200 Subject: [PATCH] fix coturn container --- docker-compose.tmpl.yml | 3 ++- mod/coturn/entrypoint.sh | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docker-compose.tmpl.yml b/docker-compose.tmpl.yml index 3cd7ce5..9625898 100644 --- a/docker-compose.tmpl.yml +++ b/docker-compose.tmpl.yml @@ -387,7 +387,7 @@ services: {{ if isTrue .Env.ENABLE_COTURN }} # coturn coturn: - image: coturn/coturn:4.5 + image: coturn/coturn:4.5-alpine restart: unless-stopped command: - "--external-ip=${EXTERNAL_IPv4}/${EXTERNAL_IPv4}" @@ -404,6 +404,7 @@ services: - ./mod/coturn/turnserver.conf:/etc/coturn/turnserver.conf environment: ENABLE_HTTPS_PROXY: + user: root network_mode: host {{end}} diff --git a/mod/coturn/entrypoint.sh b/mod/coturn/entrypoint.sh index c916cee..62cd126 100755 --- a/mod/coturn/entrypoint.sh +++ b/mod/coturn/entrypoint.sh @@ -1,7 +1,7 @@ #!/bin/sh set -e +apk add jq su-exec if [ "$ENABLE_HTTPS_PROXY" == true ]; then - apk add jq while [ ! -f /etc/resty-auto-ssl/storage/file/*latest ] do @@ -28,4 +28,4 @@ if [ "${1:0:1}" == '-' ]; then set -- turnserver "$@" fi -exec $(eval "echo $@") \ No newline at end of file +su-exec nobody $(eval "echo $@") \ No newline at end of file