feat(stream): connect nginx with backend with controllers
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
FROM tiangolo/nginx-rtmp
|
||||
|
||||
RUN apt-get update && apt-get install -y gettext-base && rm -rf /var/lib/apt/lists/*
|
||||
COPY default.conf.template /etc/nginx/templates/default.conf.template
|
||||
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
||||
|
||||
COPY nginx.conf /etc/nginx/nginx.conf.template
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
RUN chmod +x /docker-entrypoint.sh
|
||||
|
||||
EXPOSE 1935
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
9
nginx/docker-entrypoint.sh
Normal file
9
nginx/docker-entrypoint.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
# must only run on certain env files, otherwise it replaces too much
|
||||
envsubst '${WEB_SERVER_URL}' \
|
||||
< /etc/nginx/templates/default.conf.template \
|
||||
> /etc/nginx/nginx.conf
|
||||
|
||||
# daemon off required otherwise the container would exit immediately after nginx forks to background.
|
||||
exec nginx -g "daemon off;"
|
||||
Reference in New Issue
Block a user