deployment: external-turn - More explanatory comments at .env and certbot.sh

pull/701/head
cruizba 2022-02-25 20:01:51 +01:00
parent d708d7f757
commit 6d018de09d
2 changed files with 4 additions and 3 deletions

View File

@ -1,10 +1,10 @@
# The domain which is pointing to the public ip of the machine. # The domain which is pointing to the public ip of the machine.
TURN_DOMAIN_NAME= TURN_DOMAIN_NAME=
# If CERTIFICATE_TYPE=letsencrypt, you need to configure a valid email for notifications # Valid certificate for letsencrypt
LETSENCRYPT_EMAIL= LETSENCRYPT_EMAIL=
# TURN fixed credentials. This parameter purpose is to support "TURN Server REST API". # TURN shared key with OpenVidu. This parameter purpose is to support "TURN Server REST API".
# See: # See:
# - https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00 # - https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00
# - https://www.ietf.org/proceedings/87/slides/slides-87-behave-10.pdf # - https://www.ietf.org/proceedings/87/slides/slides-87-behave-10.pdf

View File

@ -16,6 +16,7 @@ while :; do
CERTIFICATES_FOUND=true CERTIFICATES_FOUND=true
fi fi
certbot "$@"; certbot "$@";
# Let coturn to load letsencrypt certificates
chmod 777 -R /etc/letsencrypt; chmod 777 -R /etc/letsencrypt;
TURN_PID=$(pgrep -n '^turnserver$') TURN_PID=$(pgrep -n '^turnserver$')
if [ -n "${TURN_PID}" ]; then if [ -n "${TURN_PID}" ]; then
@ -24,7 +25,7 @@ while :; do
kill -KILL "${TURN_PID}" kill -KILL "${TURN_PID}"
else else
# Send SIGUSR2 signal to coturn to restart process with new certificates # Send SIGUSR2 signal to coturn to restart process with new certificates
# As certbot is running in the same namespace as coturn (#pid:container:coturn), # As certbot is running in the same namespace as coturn,
# it will send the signal to the coturn process to reload the certificates # it will send the signal to the coturn process to reload the certificates
kill -USR2 "${TURN_PID}" kill -USR2 "${TURN_PID}"
fi fi