This commit is contained in:
Adolfo Delorenzo 2023-01-20 22:57:38 +00:00
parent f144a6f0a4
commit b251e59025
4 changed files with 106 additions and 2 deletions

View File

@ -2,7 +2,7 @@ ARG DEBIAN_VERSION=stretch-slim
##### Building stage ##### ##### Building stage #####
FROM debian:${DEBIAN_VERSION} as builder FROM debian:${DEBIAN_VERSION} as builder
MAINTAINER Tareq Alqutami <tareqaziz2010@gmail.com> MAINTAINER Adolfo Delorenzo <adolfo@delorenzo.com>
# Versions of nginx, rtmp-module and ffmpeg # Versions of nginx, rtmp-module and ffmpeg
ARG NGINX_VERSION=1.17.5 ARG NGINX_VERSION=1.17.5
@ -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 && \ libmp3lame-dev libx264-dev libx265-dev lighttpd && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
@ -109,8 +109,10 @@ COPY conf/nginx.conf /etc/nginx/nginx.conf
# Copy html players to container # Copy html players to container
COPY players /usr/local/nginx/html/players COPY players /usr/local/nginx/html/players
COPY html /var/www/html
EXPOSE 1935 EXPOSE 1935
EXPOSE 8080 EXPOSE 8080
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"] CMD ["nginx", "-g", "daemon off;"]

10
docker-compose.yaml Normal file
View File

@ -0,0 +1,10 @@
version: '3.3'
services:
adelorenzo:
ports:
- '1935:1935'
- '8080:8080'
- '80:80'
image: 'git.oe74.net/adelorenzo/rtmp-adr:0.3'
labels:
kompose.service.type: nodeport

23
html/index.html Normal file
View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HLS Live Streaming</title>
<link href="https://vjs.zencdn.net/7.5.5/video-js.css" rel="stylesheet">
<script src="https://vjs.zencdn.net/7.5.5/video.js"></script>
</head>
<body>
<h1>HLS Player</h1>
<video id="player" class="video-js vjs-default-skin" width="720" controls preload="auto">
<source src="/hls/test.m3u8" type="application/x-mpegURL" />
</video>
<script>
var player = videojs('#player');
</script>
<div id="footer">
<font size="2"> Tareq-Alqutami - 2019</font>
</div>
</body>
</html>

69
rtmp-adr.yaml Normal file
View File

@ -0,0 +1,69 @@
apiVersion: v1
items:
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -o rtmp-adr.yaml
kompose.service.type: nodeport
kompose.version: 1.27.0 (b0ed6a2c9)
creationTimestamp: null
labels:
io.kompose.service: adelorenzo
name: adelorenzo
spec:
ports:
- name: "1935"
port: 1935
targetPort: 1935
- name: "8080"
port: 8080
targetPort: 8080
- name: "80"
port: 80
targetPort: 80
selector:
io.kompose.service: adelorenzo
type: NodePort
status:
loadBalancer: {}
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -o rtmp-adr.yaml
kompose.service.type: nodeport
kompose.version: 1.27.0 (b0ed6a2c9)
creationTimestamp: null
labels:
io.kompose.service: adelorenzo
name: adelorenzo
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: adelorenzo
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -o rtmp-adr.yaml
kompose.service.type: nodeport
kompose.version: 1.27.0 (b0ed6a2c9)
creationTimestamp: null
labels:
io.kompose.service: adelorenzo
spec:
containers:
- image: git.oe74.net/adelorenzo/rtmp-adr:0.3
name: adelorenzo
ports:
- containerPort: 1935
- containerPort: 8080
- containerPort: 80
resources: {}
restartPolicy: Always
status: {}
kind: List
metadata: {}