forked from jitsi/docker-jitsi-meet
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
jitsi#163 Fix prosody configuration Fix web configuration Fix name : turn => coturn Update README.md
- Loading branch information
Showing
11 changed files
with
155 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version: '3' | ||
|
||
services: | ||
# coturn TURN server project | ||
turn: | ||
image: jitsi/coturn | ||
restart: always | ||
volumes: | ||
- ${CONFIG}/turn:/config | ||
ports: | ||
- '${TURN_PORT}:${TURN_PORT}/tcp' | ||
- '${TURN_PORT}:${TURN_PORT}/udp' | ||
- '${TURN_RTP_MIN}-${TURN_RTP_MAX}:${TURN_RTP_MIN}-${TURN_RTP_MAX}/udp' | ||
- '${TURN_ADMIN_PORT}:${TURN_ADMIN_PORT}/tcp' | ||
environment: | ||
- DOCKER_HOST_ADDRESS | ||
- TURN_SECRET | ||
- TURN_REALM | ||
- TURN_HOST | ||
- TURN_PORT | ||
- TURN_TRANSPORT | ||
- TURN_RTP_MIN | ||
- TURN_RTP_MAX | ||
- TURN_ADMIN_ENABLE | ||
- TURN_ADMIN_USER | ||
- TURN_ADMIN_SECRET | ||
- TURN_ADMIN_PORT | ||
networks: | ||
meet.jitsi: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ARG VERSION | ||
FROM instrumentisto/coturn:${VERSION:-latest} | ||
|
||
RUN apk add --no-cache openssl | ||
|
||
ADD ./rootfs/defaults/docker-entrypoint.sh /docker-entrypoint.sh | ||
|
||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
|
||
VOLUME ["/config"] | ||
|
||
EXPOSE 5349 8443 10000:11000/udp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
build: | ||
docker build $(BUILD_ARGS) -t $(JITSI_REPO)/coturn . | ||
|
||
.PHONY: build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/ash | ||
|
||
# make certs if not exist | ||
if [[ ! -f /config/cert.crt || ! -f /config/cert.key ]]; then | ||
openssl req -newkey rsa:2048 -nodes -keyout /config/cert.key -x509 -days 3650 -out /config/cert.crt -subj "/C=US/ST=NY/L=NY/O=IT/CN=${TURN_HOST}" | ||
fi | ||
|
||
# use non empty TURN_PUBLIC_IP variable, othervise set it dynamically. | ||
[ -z "${TURN_PUBLIC_IP}" ] && export TURN_PUBLIC_IP=$(curl -4ks https://icanhazip.com) | ||
[ -z "${TURN_PUBLIC_IP}" ] && echo "ERROR: variable TURN_PUBLIC_IP is not set and can not be set dynamically!" && kill 1 | ||
|
||
# set coturn web-admin access | ||
if [[ "${TURN_ADMIN_ENABLE}" == "1" || "${TURN_ADMIN_ENABLE}" == "true" ]]; then | ||
turnadmin -A -u ${TURN_ADMIN_USER:-admin} -p ${TURN_ADMIN_SECRET:-changeme} | ||
export TURN_ADMIN_OPTIONS="--web-admin --web-admin-ip=$(hostname -i) --web-admin-port=${TURN_ADMIN_PORT:-8443}" | ||
fi | ||
|
||
# run coturn server with API auth method enabled. | ||
turnserver -n ${TURN_ADMIN_OPTIONS} \ | ||
--verbose \ | ||
--prod \ | ||
--no-tlsv1 \ | ||
--no-tlsv1_1 \ | ||
--log-file=stdout \ | ||
--listening-port=${TURN_PORT:-5349} \ | ||
--tls-listening-port=${TURN_PORT:-5349} \ | ||
--alt-listening-port=${TURN_PORT:-5349} \ | ||
--alt-tls-listening-port=${TURN_PORT:-5349} \ | ||
--cert=/config/cert.crt \ | ||
--pkey=/config/cert.key \ | ||
--min-port=${TURN_RTP_MIN:-10000} \ | ||
--max-port=${TURN_RTP_MAX:-11000} \ | ||
--no-stun \ | ||
--use-auth-secret \ | ||
--static-auth-secret=${TURN_SECRET:-keepthissecret} \ | ||
--no-multicast-peers \ | ||
--realm=${TURN_REALM:-realm} \ | ||
--listening-ip=$(hostname -i) \ | ||
--external-ip=${TURN_PUBLIC_IP} \ | ||
--cli-password=NotReallyCliUs3d \ | ||
--no-cli | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters