From 883fa6a18260ed852d88fbf9c7925e131254de64 Mon Sep 17 00:00:00 2001 From: deflax Date: Mon, 11 Oct 2021 00:48:23 +0000 Subject: [PATCH] bring frontend on root and move fallback videos to their own location --- docker-compose.yml | 4 ++-- frontend/Dockerfile | 1 + rtmp/Dockerfile | 1 - rtmp/index.html | 41 ----------------------------------------- rtmp/nginx.conf | 10 +++++----- 5 files changed, 8 insertions(+), 49 deletions(-) delete mode 100644 rtmp/index.html diff --git a/docker-compose.yml b/docker-compose.yml index 74e7222..df81435 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -53,8 +53,8 @@ services: rtmp: build: ./rtmp hostname: rtmp - ports: - - "18080:18080" + #ports: + # - "18080:18080" volumes: - "./data/rtmp/hls:/tmp/hls" depends_on: diff --git a/frontend/Dockerfile b/frontend/Dockerfile index e9e5a6d..ae21e1e 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -9,3 +9,4 @@ ADD https://github.com/bilibili/flv.js/releases/download/v1.5.0/flv.min.js /code RUN chmod 644 /code/static/flv.min.js USER nobody WORKDIR /code +EXPOSE 5001 diff --git a/rtmp/Dockerfile b/rtmp/Dockerfile index 954620b..b6e1bf9 100644 --- a/rtmp/Dockerfile +++ b/rtmp/Dockerfile @@ -61,7 +61,6 @@ COPY nginx.conf /etc/nginx/nginx.conf COPY mime.types /etc/nginx/mime.types # Copy fallback data -COPY index.html /www/ COPY network.m3u8 /www/ COPY network0.ts /www/ COPY network1.ts /www/ diff --git a/rtmp/index.html b/rtmp/index.html deleted file mode 100644 index a9843dc..0000000 --- a/rtmp/index.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - Live Stream - - -

Live Stream

- - - - - - - diff --git a/rtmp/nginx.conf b/rtmp/nginx.conf index c06dddf..d22fe75 100644 --- a/rtmp/nginx.conf +++ b/rtmp/nginx.conf @@ -49,16 +49,16 @@ http { listen 8080; location / { + proxy_pass http://frontend:5001; + include /etc/nginx/mime.types; + } + + location /fallback { root /www; add_header Cache-Control no-cache; add_header Access-Control-Allow-Origin *; } - location /admin { - proxy_pass http://frontend:5001; - include /etc/nginx/mime.types; - } - location /hls { types { application/vnd.apple.mpegurl m3u8;