Verified Commit 5f8e0f26 authored by EorlBruder's avatar EorlBruder
Browse files

feat(icecast): add reverse proxy

parent 7c534dc7
Pipeline #1760 passed with stage
in 5 minutes and 44 seconds
......@@ -26,6 +26,8 @@ FROM nginx:stable-alpine AS prod
RUN apk add certbot certbot-nginx
COPY nginx/nginx.prod.template /etc/nginx/conf.d/nginx.template
RUN mkdir /etc/nginx/conf.d/locations
COPY nginx/icecast.template /etc/nginx/conf.d/locations/icecast.template
COPY nginx/run.sh /run.sh
COPY --from=prod_builder /dashboard/dist /usr/share/nginx/html
......
location /icecast/ {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_pass http://icecast:8000/;
proxy_redirect $scheme://$host/ /;
proxy_redirect ~^/?(.*)$ $scheme://$host:$server_port/icecast/$1;
sub_filter 'href="/' 'href="/icecast/';
sub_filter 'src="/' 'src="/icecast/';
sub_filter 'action="/' 'action="/icecast/';
sub_filter_once off;
}
......@@ -58,4 +58,5 @@ server {
proxy_pass http://tank:8040/;
}
include /etc/nginx/conf.d/locations/icecast.conf;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment