Add a Nginx reverse proxy to combine all the used ports into one single port
This will allow this web UI to sit nicely behind a reverse proxy. Dynamically set the ports used for the - VNC service - noVNC service - Pulseaudio socket - VNC audio transport websocket Remove all mentions of the above used ports in the Dockerfile.
This commit is contained in:
@@ -6,7 +6,7 @@ autorestart=true
|
||||
# Retry a restart a few times.
|
||||
# This allows this container to start up before X is ready and restart the process until it becomes available.
|
||||
# Each restart will have a small delay of a few seconds. So 50 attempts should be a few mins.
|
||||
startretries=50
|
||||
startretries=50
|
||||
priority=50
|
||||
user=%(ENV_USER)s
|
||||
directory=/home/%(ENV_USER)s
|
||||
|
||||
@@ -18,7 +18,8 @@ autostart=false
|
||||
autorestart=true
|
||||
priority=30
|
||||
user=%(ENV_USER)s
|
||||
command=/opt/noVNC/utils/launch.sh --vnc localhost:%(ENV_PORT_VNC)s --listen %(ENV_PORT_NOVNC_WEB)s
|
||||
# /opt/noVNC/utils/launch.sh --vnc localhost:${PORT_VNC} --listen ${PORT_NOVNC_SERVICE}
|
||||
command=/opt/noVNC/utils/launch.sh --vnc localhost:%(ENV_PORT_VNC)s --listen %(ENV_PORT_NOVNC_SERVICE)s
|
||||
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s"
|
||||
stopsignal=INT
|
||||
stdout_logfile=/home/%(ENV_USER)s/.cache/log/novnc.log
|
||||
@@ -27,3 +28,20 @@ stdout_logfile_backups=7
|
||||
stderr_logfile=/home/%(ENV_USER)s/.cache/log/novnc.err.log
|
||||
stderr_logfile_maxbytes=10MB
|
||||
stderr_logfile_backups=7
|
||||
|
||||
[program:vncproxy]
|
||||
autostart=false
|
||||
autorestart=true
|
||||
priority=30
|
||||
numprocs=1
|
||||
startsecs=0
|
||||
user=%(ENV_USER)s
|
||||
command=/usr/sbin/nginx -c /opt/noVNC/nginx.conf
|
||||
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s"
|
||||
stopsignal=INT
|
||||
stdout_logfile=/home/%(ENV_USER)s/.cache/log/vncproxy.log
|
||||
stdout_logfile_maxbytes=10MB
|
||||
stdout_logfile_backups=7
|
||||
stderr_logfile=/home/%(ENV_USER)s/.cache/log/vncproxy.err.log
|
||||
stderr_logfile_maxbytes=10MB
|
||||
stderr_logfile_backups=7
|
||||
|
||||
Reference in New Issue
Block a user