diff --git a/README.md b/README.md index 62f37f7..1440c8c 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,9 @@ The configuration file is in /opt/nginx/conf/ To run the container and bind the port 1935 to the host machine; run the following: ``` -docker run -p 1935:1935 -p 8080:8080 jasonrivers/nginx-rtmp +docker run -d -p 1935:1935 -p 8080:8080 jasonrivers/nginx-rtmp ``` +The option -d means that docker will run in the background. ### Multiple Streams: You can enable multiple streams on the container by setting RTMP_STREAM_NAMES when launching, This is a comma seperated list of names, E.G. @@ -40,6 +41,18 @@ docker run \ jasonrivers/nginx-rtmp ``` +### Run the container automatically + +``` +docker run \ + -p 1935:1935 \ + -p 8080:8080 \ + --restart=always \ + -e RTMP_STREAM_NAMES=live,teststream1,teststream2 \ + jasonrivers/nginx-rtmp +``` +The option --restart=always will let the container run automatically when Docker starts. + ## OBS Configuration Under broadcast settigns, set the follwing parameters: ``` diff --git a/run.sh b/run.sh index 6fb8628..6b1f552 100755 --- a/run.sh +++ b/run.sh @@ -100,7 +100,7 @@ cat >>${NGINX_CONFIG_FILE} <>${NGINX_CONFIG_FILE} <>${NGINX_CONFIG_FILE} <