This commit is contained in:
Adolfo Delorenzo 2023-01-20 23:40:33 +00:00
parent b251e59025
commit 216c0da73a
4 changed files with 44 additions and 4 deletions

View File

@ -16,7 +16,7 @@ RUN apt-get update && \
openssl libssl-dev yasm \ openssl libssl-dev yasm \
libpcre3-dev librtmp-dev libtheora-dev \ libpcre3-dev librtmp-dev libtheora-dev \
libvorbis-dev libvpx-dev libfreetype6-dev \ libvorbis-dev libvpx-dev libfreetype6-dev \
libmp3lame-dev libx264-dev libx265-dev lighttpd && \ libmp3lame-dev libx264-dev libx265-dev && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
@ -93,6 +93,10 @@ RUN apt-get update && \
libvpx4 libx264-dev libx265-dev && \ libvpx4 libx264-dev libx265-dev && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
# Install lighttpd
RUN apt-get update && \
apt-get install -y lighttpd
# Copy files from build stage to final stage # Copy files from build stage to final stage
COPY --from=builder /usr/local /usr/local COPY --from=builder /usr/local /usr/local
COPY --from=builder /etc/nginx /etc/nginx COPY --from=builder /etc/nginx /etc/nginx
@ -115,4 +119,5 @@ EXPOSE 1935
EXPOSE 8080 EXPOSE 8080
EXPOSE 80 EXPOSE 80
CMD ["nginx", "-g", "daemon off;"] #CMD ["nginx", "-g", "daemon off;"]
CMD ["lighttpd", "-f", "/etc/lighttpd/lighttpd.conf", "&&", "nginx", "-g", "daemon off;"]

View File

@ -1,6 +1,6 @@
version: '3.3' version: '3.3'
services: services:
adelorenzo: rtmp-adr:
ports: ports:
- '1935:1935' - '1935:1935'
- '8080:8080' - '8080:8080'

View File

@ -9,7 +9,7 @@
<body> <body>
<h1>HLS Player</h1> <h1>HLS Player</h1>
<video id="player" class="video-js vjs-default-skin" width="720" controls preload="auto"> <video id="player" class="video-js vjs-default-skin" width="720" controls preload="auto">
<source src="/hls/test.m3u8" type="application/x-mpegURL" /> <source src="http://fra1.edge.lol:31961/hls/portainer.m3u8" type="application/x-mpegURL" />
</video> </video>
<script> <script>
var player = videojs('#player'); var player = videojs('#player');

35
test.yaml Normal file
View File

@ -0,0 +1,35 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: rtmp-adr
name: rtmp-adr
spec:
replicas: 1
selector:
matchLabels:
app: rtmp-adr
template:
metadata:
labels:
app: rtmp-adr
spec:
containers:
- image: git.oe74.net/adelorenzo/rtmp-adr:0.6
imagePullPolicy: IfNotPresent
name: rtmp-adr
---
apiVersion: v1
kind: Service
metadata:
labels:
app: rtmp-adr
name: rtmp-adr-svc
spec:
ports:
- port: 31935
protocol: TCP
targetPort: 1935
selector:
app: rtmp-adr
type: NodePort