forked from versatica/mediasoup-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·39 lines (36 loc) · 1.43 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
export DEBUG=${DEBUG:="mediasoup:INFO* *WARN* *ERROR*"}
export INTERACTIVE=${INTERACTIVE:="true"}
export PROTOO_LISTEN_PORT=${PROTOO_LISTEN_PORT:="4443"}
export HTTPS_CERT_FULLCHAIN=${HTTPS_CERT_FULLCHAIN:="/service/certs/fullchain.pem"}
export HTTPS_CERT_PRIVKEY=${HTTPS_CERT_PRIVKEY:="/service/certs/privkey.pem"}
export MEDIASOUP_LISTEN_IP=${MEDIASOUP_LISTEN_IP:="0.0.0.0"}
export MEDIASOUP_MIN_PORT=${MEDIASOUP_MIN_PORT:="2000"}
export MEDIASOUP_MAX_PORT=${MEDIASOUP_MAX_PORT:="2020"}
# Valgrind related options.
export MEDIASOUP_USE_VALGRIND=${MEDIASOUP_USE_VALGRIND:="false"}
export MEDIASOUP_VALGRIND_OPTIONS=${MEDIASOUP_VALGRIND_OPTIONS:="--leak-check=full --track-fds=yes --log-file=/storage/mediasoup_valgrind_%p.log"}
docker run \
--name=mediasoup-demo \
-p ${PROTOO_LISTEN_PORT}:${PROTOO_LISTEN_PORT}/tcp \
-p ${MEDIASOUP_MIN_PORT}-${MEDIASOUP_MAX_PORT}:${MEDIASOUP_MIN_PORT}-${MEDIASOUP_MAX_PORT}/udp \
-p ${MEDIASOUP_MIN_PORT}-${MEDIASOUP_MAX_PORT}:${MEDIASOUP_MIN_PORT}-${MEDIASOUP_MAX_PORT}/tcp \
-v ${PWD}:/storage \
-v ${MEDIASOUP_SRC}:/mediasoup-src \
--init \
-e DEBUG \
-e INTERACTIVE \
-e DOMAIN \
-e PROTOO_LISTEN_PORT \
-e HTTPS_CERT_FULLCHAIN \
-e HTTPS_CERT_PRIVKEY \
-e MEDIASOUP_LISTEN_IP \
-e MEDIASOUP_ANNOUNCED_IP \
-e MEDIASOUP_MIN_PORT \
-e MEDIASOUP_MAX_PORT \
-e MEDIASOUP_USE_VALGRIND \
-e MEDIASOUP_VALGRIND_OPTIONS \
-e MEDIASOUP_WORKER_BIN \
-it \
--rm \
mediasoup-demo:latest