feat(stream): connect nginx with backend with controllers

This commit is contained in:
2026-05-18 22:27:49 +01:00
parent 3b188a3497
commit 1dbc40d8e6
12 changed files with 170 additions and 12 deletions

View File

@@ -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"]

View 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;"