|
|
@@ -54,8 +54,8 @@ echo "# Selkies-GStreamer NGINX Configuration
|
|
|
server {
|
|
|
access_log /dev/stdout;
|
|
|
error_log /dev/stderr;
|
|
|
- listen 8080 $(if [ \"$(echo ${SELKIES_ENABLE_HTTPS} | tr '[:upper:]' '[:lower:]')\" = \"true\" ]; then echo -n "ssl"; fi);
|
|
|
- listen [::]:8080 $(if [ \"$(echo ${SELKIES_ENABLE_HTTPS} | tr '[:upper:]' '[:lower:]')\" = \"true\" ]; then echo -n "ssl"; fi);
|
|
|
+ listen ${NGINX_PORT:-8080} $(if [ \"$(echo ${SELKIES_ENABLE_HTTPS} | tr '[:upper:]' '[:lower:]')\" = \"true\" ]; then echo -n "ssl"; fi);
|
|
|
+ listen [::]:${NGINX_PORT:-8080} $(if [ \"$(echo ${SELKIES_ENABLE_HTTPS} | tr '[:upper:]' '[:lower:]')\" = \"true\" ]; then echo -n "ssl"; fi);
|
|
|
ssl_certificate ${SELKIES_HTTPS_CERT-/etc/ssl/certs/ssl-cert-snakeoil.pem};
|
|
|
ssl_certificate_key ${SELKIES_HTTPS_KEY-/etc/ssl/private/ssl-cert-snakeoil.key};
|
|
|
$(if [ \"$(echo ${SELKIES_ENABLE_BASIC_AUTH} | tr '[:upper:]' '[:lower:]')\" != \"false\" ]; then echo "auth_basic \"Selkies\";"; echo -n " auth_basic_user_file ${XDG_RUNTIME_DIR}/.htpasswd;"; fi)
|
|
|
@@ -74,7 +74,7 @@ server {
|
|
|
|
|
|
client_max_body_size 10M;
|
|
|
|
|
|
- proxy_pass http$(if [ \"$(echo ${SELKIES_ENABLE_HTTPS} | tr '[:upper:]' '[:lower:]')\" = \"true\" ]; then echo -n "s"; fi)://localhost:8081;
|
|
|
+ proxy_pass http$(if [ \"$(echo ${SELKIES_ENABLE_HTTPS} | tr '[:upper:]' '[:lower:]')\" = \"true\" ]; then echo -n "s"; fi)://localhost:${SELKIES_PORT:-8081};
|
|
|
}
|
|
|
|
|
|
location /turn {
|
|
|
@@ -86,7 +86,7 @@ server {
|
|
|
|
|
|
client_max_body_size 10M;
|
|
|
|
|
|
- proxy_pass http$(if [ \"$(echo ${SELKIES_ENABLE_HTTPS} | tr '[:upper:]' '[:lower:]')\" = \"true\" ]; then echo -n "s"; fi)://localhost:8081;
|
|
|
+ proxy_pass http$(if [ \"$(echo ${SELKIES_ENABLE_HTTPS} | tr '[:upper:]' '[:lower:]')\" = \"true\" ]; then echo -n "s"; fi)://localhost:${SELKIES_PORT:-8081};
|
|
|
}
|
|
|
|
|
|
location /ws {
|
|
|
@@ -106,7 +106,7 @@ server {
|
|
|
|
|
|
client_max_body_size 10M;
|
|
|
|
|
|
- proxy_pass http$(if [ \"$(echo ${SELKIES_ENABLE_HTTPS} | tr '[:upper:]' '[:lower:]')\" = \"true\" ]; then echo -n "s"; fi)://localhost:8081;
|
|
|
+ proxy_pass http$(if [ \"$(echo ${SELKIES_ENABLE_HTTPS} | tr '[:upper:]' '[:lower:]')\" = \"true\" ]; then echo -n "s"; fi)://localhost:${SELKIES_PORT:-8081};
|
|
|
}
|
|
|
|
|
|
location /webrtc/signalling {
|
|
|
@@ -126,7 +126,7 @@ server {
|
|
|
|
|
|
client_max_body_size 10M;
|
|
|
|
|
|
- proxy_pass http$(if [ \"$(echo ${SELKIES_ENABLE_HTTPS} | tr '[:upper:]' '[:lower:]')\" = \"true\" ]; then echo -n "s"; fi)://localhost:8081;
|
|
|
+ proxy_pass http$(if [ \"$(echo ${SELKIES_ENABLE_HTTPS} | tr '[:upper:]' '[:lower:]')\" = \"true\" ]; then echo -n "s"; fi)://localhost:${SELKIES_PORT:-8081};
|
|
|
}
|
|
|
|
|
|
location /metrics {
|
|
|
@@ -153,8 +153,8 @@ rm -rf "${HOME}/.cache/gstreamer-1.0"
|
|
|
# Start the Selkies-GStreamer WebRTC HTML5 remote desktop application
|
|
|
selkies-gstreamer \
|
|
|
--addr="localhost" \
|
|
|
- --port="8081" \
|
|
|
+ --port="${SELKIES_PORT:-8081}" \
|
|
|
--enable_basic_auth="false" \
|
|
|
--enable_metrics_http="true" \
|
|
|
- --metrics_http_port="9081" \
|
|
|
+ --metrics_http_port="${SELKIES_METRICS_HTTP_PORT:-9081}" \
|
|
|
$@
|