Start with HA s6 config
This commit is contained in:
parent
04d7fd3520
commit
6cdff6ea0b
@ -56,6 +56,9 @@ RUN mv janus/libjanus_ustreamer.so /opt/janus/lib/janus/plugins/libjanus_ustream
|
|||||||
FROM ${BUILD_FROM} AS final
|
FROM ${BUILD_FROM} AS final
|
||||||
ENV LANG C.UTF-8
|
ENV LANG C.UTF-8
|
||||||
|
|
||||||
|
COPY --from=builder /opt/janus /opt/janus
|
||||||
|
COPY --from=builder /usr/local/bin/ustreamer /usr/local/bin/ustreamer
|
||||||
|
|
||||||
RUN apk add -U \
|
RUN apk add -U \
|
||||||
alsa-lib \
|
alsa-lib \
|
||||||
curl \
|
curl \
|
||||||
@ -80,9 +83,6 @@ RUN apk add -U \
|
|||||||
zlib \
|
zlib \
|
||||||
caddy
|
caddy
|
||||||
|
|
||||||
COPY --from=builder /opt/janus /opt/janus
|
|
||||||
COPY --from=builder /usr/local/bin/ustreamer /usr/local/bin/ustreamer
|
|
||||||
|
|
||||||
COPY rootfs/ /
|
COPY rootfs/ /
|
||||||
|
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|||||||
@ -1,4 +1,12 @@
|
|||||||
localhost
|
# Ingress
|
||||||
|
:8099 {
|
||||||
|
@blocked not remote_ip 172.30.32.2
|
||||||
|
respond @blocked "This is only for access through Ingress" 403
|
||||||
|
reverse_proxy 127.0.0.1:8080
|
||||||
|
}
|
||||||
|
|
||||||
root * /server
|
# External access
|
||||||
file_server
|
:8080 {
|
||||||
|
root * /opt/janus/share/janus/demos
|
||||||
|
file_server
|
||||||
|
}
|
||||||
|
|||||||
22
camera-ustreamer/rootfs/etc/cont-init.d/proxy.sh
Normal file
22
camera-ustreamer/rootfs/etc/cont-init.d/proxy.sh
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/with-contenv bashio
|
||||||
|
# ==============================================================================
|
||||||
|
# Add-on: aiortc
|
||||||
|
# Configures NGINX for use with aiortc
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# Generate Ingress configuration
|
||||||
|
bashio::var.json \
|
||||||
|
interface "$(bashio::addon.ip_address)" \
|
||||||
|
port "^$(bashio::addon.ingress_port)" \
|
||||||
|
| tempio \
|
||||||
|
-template /etc/nginx/templates/ingress.gtpl \
|
||||||
|
-out /etc/nginx/servers/ingress.conf
|
||||||
|
|
||||||
|
# Generate direct access configuration, if enabled.
|
||||||
|
if bashio::var.has_value "$(bashio::addon.port 80)"; then
|
||||||
|
bashio::var.json \
|
||||||
|
port "^$(bashio::addon.port 80)" \
|
||||||
|
| tempio \
|
||||||
|
-template /etc/nginx/templates/direct.gtpl \
|
||||||
|
-out /etc/nginx/servers/direct.conf
|
||||||
|
fi
|
||||||
0
camera-ustreamer/rootfs/etc/services.d/janus/down
Normal file
0
camera-ustreamer/rootfs/etc/services.d/janus/down
Normal file
9
camera-ustreamer/rootfs/etc/services.d/janus/run
Normal file
9
camera-ustreamer/rootfs/etc/services.d/janus/run
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/with-contenv bashio
|
||||||
|
# ==============================================================================
|
||||||
|
# Add-on: camera-ustreamer
|
||||||
|
# Runs janus
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
bashio::log.info "Starting janus.."
|
||||||
|
|
||||||
|
exec /opt/janus/bin/janus
|
||||||
@ -1,9 +0,0 @@
|
|||||||
#!/usr/bin/execlineb -S0
|
|
||||||
# ==============================================================================
|
|
||||||
# Add-on: mjpg-streamer
|
|
||||||
# Take down the S6 supervision tree when Nginx fails
|
|
||||||
# ==============================================================================
|
|
||||||
if -n { s6-test $# -ne 0 }
|
|
||||||
if -n { s6-test ${1} -eq 256 }
|
|
||||||
|
|
||||||
s6-svscanctl -t /var/run/s6/services
|
|
||||||
@ -1,11 +1,8 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
#!/usr/bin/with-contenv bashio
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# Add-on: mjpg-streamer
|
# Add-on: camera-ustreamer
|
||||||
# Runs the Nginx daemon
|
# Runs the proxy daemon
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
|
||||||
# Wait for aiortc web server to be available
|
|
||||||
bashio::net.wait_for 80
|
|
||||||
|
|
||||||
bashio::log.info "Starting proxy..."
|
bashio::log.info "Starting proxy..."
|
||||||
# exec caddy run -config /etc/caddy/Caddyfile
|
exec caddy run -config /etc/caddy/Caddyfile
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/execlineb -S0
|
#!/usr/bin/execlineb -S0
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# Add-on: mjpg-streamer
|
# Add-on: camera-ustreamer
|
||||||
# Take down the S6 supervision tree when mjpg-streamer fails
|
# Take down the S6 supervision tree when ustreamer fails
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
if -n { s6-test $# -ne 0 }
|
if -n { s6-test $# -ne 0 }
|
||||||
if -n { s6-test ${1} -eq 256 }
|
if -n { s6-test ${1} -eq 256 }
|
||||||
|
|||||||
@ -6,4 +6,5 @@
|
|||||||
|
|
||||||
bashio::log.info "Starting mjpg-streamer.."
|
bashio::log.info "Starting mjpg-streamer.."
|
||||||
|
|
||||||
mjpg_streamer -i "$(bashio::config 'mjpg_input')" -o "output_http.so -w /www_mjpg -p 80"
|
# mjpg_streamer -i "$(bashio::config 'mjpg_input')" -o "output_http.so -w /www_mjpg -p 80"
|
||||||
|
exec ustreamer --host=127.0.0.1 --port=80
|
||||||
Loading…
Reference in New Issue
Block a user