Prepare for test on device

This commit is contained in:
Fredrik Baberg
2023-03-16 12:02:45 +01:00
parent 6cdff6ea0b
commit 5af6182cbd
7 changed files with 57 additions and 42 deletions

View File

@@ -1,12 +1,18 @@
# 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
# @blocked not remote_ip 172.30.32.2
# respond @blocked "This is only for access through Ingress" 403
handle_path /janus/* {
reverse_proxy localhost:8188 # Janus API
}
reverse_proxy 127.0.0.1:8080 # ustreamer
}
# External access
:8080 {
root * /opt/janus/share/janus/demos
file_server
:80 {
root * /opt/janus/share/janus/demos
handle_path /janus/* {
reverse_proxy localhost:8188 # Janus API
}
file_server # Janus demo
}

View File

@@ -1,22 +1,22 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Add-on: aiortc
# Configures NGINX for use with aiortc
# ==============================================================================
# #!/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 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
# # 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

View File

@@ -6,4 +6,4 @@
bashio::log.info "Starting janus.."
exec /opt/janus/bin/janus
exec /opt/janus/bin/janus --configs-folder /opt/janus/etc/janus/ --plugins-folder /opt/janus/lib/janus/plugins/

View File

@@ -7,4 +7,4 @@
bashio::log.info "Starting mjpg-streamer.."
# 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
exec ustreamer --host=127.0.0.1 --h264-sink demo::ustreamer::h264 --h264-sink-mode 660 --h264-sink-rm