This commit is contained in:
		@@ -40,6 +40,9 @@ RUN ln -sf /dev/stdout /var/log/nginx/access.log && \
 | 
				
			|||||||
    ln -sf /dev/stderr /var/log/nginx/error.log
 | 
					    ln -sf /dev/stderr /var/log/nginx/error.log
 | 
				
			||||||
 | 
					
 | 
				
			||||||
COPY startscript.sh /usr/sbin/startscript.sh
 | 
					COPY startscript.sh /usr/sbin/startscript.sh
 | 
				
			||||||
 | 
					COPY nginx_ingest.conf /etc/nginx/nginx_ingest.conf
 | 
				
			||||||
 | 
					COPY nginx_restream.conf /etc/nginx/nginx_ingest.conf
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
EXPOSE 1935
 | 
					EXPOSE 1935
 | 
				
			||||||
CMD ["bash", "/usr/sbin/startscript.sh"]
 | 
					CMD ["bash", "/usr/sbin/startscript.sh"]
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,8 @@
 | 
				
			|||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
NGINX_CONF=/etc/nginx/nginx.conf
 | 
					NGINX_CONF=/etc/nginx/nginx.conf
 | 
				
			||||||
 | 
					NGINX_INGEST_CONF=/etc/nginx/nginx_ingest.conf
 | 
				
			||||||
 | 
					NGINX_RESTREAM_CONF=/etc/nginx/nginx_restream.conf
 | 
				
			||||||
if test -f "$NGINX_CONF"; then
 | 
					if test -f "$NGINX_CONF"; then
 | 
				
			||||||
  nginx -g daemon off;
 | 
					  nginx -g daemon off;
 | 
				
			||||||
  exit 0
 | 
					  exit 0
 | 
				
			||||||
@@ -29,7 +31,7 @@ if [[ $NGINX_TYPE == "ingest" ]]; then
 | 
				
			|||||||
  else
 | 
					  else
 | 
				
			||||||
    NGINX_STREAM_KEY="${STREAM_KEY}"
 | 
					    NGINX_STREAM_KEY="${STREAM_KEY}"
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  sed -i 's@___STREAMKEY___@'"$NGINX_STREAM_KEY"'@' nginx_ingest.conf > $NGINX_CONF
 | 
					  sed -i 's@___STREAMKEY___@'"$NGINX_STREAM_KEY"'@' $NGINX_INGEST_CONF > $NGINX_CONF
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
  if [[ -z "${PUSH_URLS}" ]]; then
 | 
					  if [[ -z "${PUSH_URLS}" ]]; then
 | 
				
			||||||
  echo -e "Envvar PUSH_URLS required"
 | 
					  echo -e "Envvar PUSH_URLS required"
 | 
				
			||||||
@@ -42,7 +44,7 @@ else
 | 
				
			|||||||
      :
 | 
					      :
 | 
				
			||||||
      NGINX_PUSH_URLS=$NGINX_PUSH_URLS$'push '$i$'\n'
 | 
					      NGINX_PUSH_URLS=$NGINX_PUSH_URLS$'push '$i$'\n'
 | 
				
			||||||
    done
 | 
					    done
 | 
				
			||||||
    sed -i 's@___PUSH_DIRECTIVES___@'"$NGINX_PUSH_URLS"'@' nginx_restream.conf > $NGINX_CONF
 | 
					    sed -i 's@___PUSH_DIRECTIVES___@'"$NGINX_PUSH_URLS"'@' $NGINX_RESTREAM_CONF > $NGINX_CONF
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user