-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
57 lines (40 loc) · 1.36 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
FROM debian:bullseye-slim
LABEL maintainer="Mark Ley - report issues & requests here https://github.com/goatie999/nginx-rtmps-docker"
# Update and Load initial packages
RUN apt-get update && \
apt-get install -y nano nginx libnginx-mod-rtmp stunnel4
# Import setting files and set new files
COPY nginx.conf /etc/nginx/nginx.conf
COPY stunnel.conf /etc/stunnel/stunnel.conf
RUN touch /var/log/stunnel4/stunnel.log
# Make any configuration changes to nginx anf stunnel
# RUN more /etc/nginx/nginx.setup >> /etc/nginx/nginx.conf
RUN echo "ENABLED=1" >> /etc/default/stunnel4
# Expose services to host
EXPOSE 1935
# Forward logs to Docker
RUN ln -sf /dev/stdout /var/log/nginx/access.log && \
ln -sf /dev/stderr /var/log/nginx/error.log
# ln -sf /dev/stdout /var/log/stunnel4/stunnel.log
#Setup Streaming Services Details
#Facebook
ENV FACEBOOK_URL rtmp://localhost:19350/rtmp/
ENV FACEBOOK_KEY ""
#Restream.io
ENV RESTREAM_URL rtmp://live.restream.io/live/
ENV RESTREAM_KEY ""
#YouTube
ENV YOUTUBE_URL rtmp://a.rtmp.youtube.com/live2/
ENV YOUTUBE_KEY ""
#Twitch
ENV TWITCH_URL rtmp://live.twitch.tv/app/
ENV TWITCH_KEY ""
#MixCloud
ENV MIXCLOUD_URL rtmp://rtmp.mixcloud.com/broadcast/
ENV MIXCLOUD_KEY ""
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 1935
ENTRYPOINT ["/entrypoint.sh"]
# Initialise nginx
CMD ["nginx", "-g", "daemon off;"]