From 72aa349f238e00f88d378eb6b83b0eeca6f18d74 Mon Sep 17 00:00:00 2001 From: Harlan Date: Sat, 30 Mar 2019 22:04:34 +0800 Subject: [PATCH 1/2] edit README --- README.md | 15 ++++++++++++++- run.sh | 4 ++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 62f37f7..3f778bc 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 with Docker start + +``` +docker run \ + -p 1935:1935 \ + -p 8080:8080 \ + --restart=always \ + -e RTMP_STREAM_NAMES=live,teststream1,teststream2 \ + jasonrivers/nginx-rtmp +``` + + ## 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} < Date: Sat, 30 Mar 2019 22:07:44 +0800 Subject: [PATCH 2/2] edit README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3f778bc..1440c8c 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ docker run \ jasonrivers/nginx-rtmp ``` -### Run the container automatically with Docker start +### Run the container automatically ``` docker run \ @@ -51,7 +51,7 @@ docker run \ -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: