-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from ualbertalib/cwant/nginx-avalon-domain
Make nginx/hls container more configurable
- Loading branch information
Showing
3 changed files
with
20 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,9 @@ MAINTAINER Michael B. Klein <[email protected]> | |
RUN apt-get update && apt-get upgrade -y | ||
RUN apt-get install -y mediainfo ffmpeg x264 | ||
RUN apt-get install -y build-essential git libpcre3-dev zlib1g-dev libssl-dev dnsmasq | ||
# gettext-base provides 'envsubst', used by nginx.sh | ||
RUN apt-get install -y gettext-base | ||
|
||
RUN apt-get clean | ||
|
||
ADD build-nginx.sh /usr/src/build-nginx.sh | ||
|
@@ -15,8 +18,10 @@ RUN useradd nginx | |
RUN mkdir /data | ||
RUN mkdir -p /var/log/nginx && chown nginx /var/log/nginx | ||
ADD stat.xsl /etc/nginx/stat.xsl | ||
RUN mkdir /etc/service/nginx | ||
RUN ln -s /usr/local/nginx/sbin/nginx /etc/service/nginx/run | ||
ADD nginx.conf /etc/nginx/nginx.conf | ||
|
||
ADD nginx.conf.template /etc/nginx/nginx.conf.template | ||
RUN mkdir /etc/service/dnsmasq | ||
ADD dnsmasq.sh /etc/service/dnsmasq/run | ||
RUN mkdir /etc/service/nginx | ||
ADD nginx.sh /etc/service/nginx/run | ||
RUN chmod +x /etc/service/nginx/run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
#!/bin/sh | ||
nginx | ||
|
||
# Make config file from template | ||
[ -z "$AVALON_DOMAIN" ] && AVALON_DOMAIN="http://avalon" | ||
[ -z "$AVALON_STREAMING_PORT" ] && AVALON_STREAMING_PORT=80 | ||
export AVALON_DOMAIN | ||
export AVALON_STREAMING_PORT | ||
envsubst '$AVALON_DOMAIN,$AVALON_STREAMING_PORT' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf | ||
|
||
exec /usr/local/nginx/sbin/nginx |