4 Commits

Author SHA1 Message Date
Josh.5
dde4d9a431 Update frontend version 2025-06-23 23:04:28 +00:00
Josh.5
d5e6427115 frontend can run as default user 2025-06-23 20:22:24 +00:00
Josh.5
183143c158 Remove unused dependencies 2025-06-23 20:22:13 +00:00
Josh.5
605687a668 Start using new frontend
I know this still needs work, but may as well start using it
2025-06-23 11:41:10 +00:00
2 changed files with 50 additions and 70 deletions

View File

@@ -307,75 +307,6 @@ RUN \
&& \ && \
echo echo
# Install Web Frontend
ARG NODE_VERSION="v20"
ARG FRONTEND_VERSION=a8eb92f
RUN \
echo "**** Install Node ${NODE_VERSION} ****" \
&& mkdir -p /tmp/nodejs \
&& rm -rf /opt/nodejs \
&& wget -qO /tmp/nodejs/nodejs.tar.xz \
"https://nodejs.org/dist/latest-${NODE_VERSION:?}.x/node-$(wget -qO- https://nodejs.org/dist/latest-${NODE_VERSION:?}.x/ | sed -nE 's|.*>node-(.*)-linux-x64\.tar.xz</a>.*|\1|p')-linux-x64.tar.xz" \
&& tar -xJf /tmp/nodejs/nodejs.tar.xz -C /tmp/nodejs --strip-components=1 \
&& mv /tmp/nodejs /opt/nodejs \
&& ln -sf /opt/nodejs/bin/node /usr/local/bin/node \
&& ln -sf /opt/nodejs/bin/npm /usr/local/bin/npm \
&& ln -sf /opt/nodejs/bin/npx /usr/local/bin/npx \
&& \
echo "**** Fetch Web Frontend ****" \
&& mkdir -p /opt \
&& cd /opt \
&& rm -rf /opt/frontend \
&& git clone https://github.com/Steam-Headless/frontend.git --branch master /opt/frontend \
&& cd /opt/frontend \
&& git checkout ${FRONTEND_VERSION} 2> /dev/null \
&& git submodule init \
&& git submodule update --depth 1 --recursive \
&& rm -rf /opt/frontend/.git \
&& \
echo "**** Configure Web Frontend ****" \
&& echo '<!DOCTYPE html>' > /opt/frontend/index.html \
&& echo '<html><head><meta http-equiv="refresh" content="0;url=./web/"></head><body><p>If you are not redirected, <a href="./web/">click here</a>.</p></body></html>' >> /opt/frontend/index.html \
&& chmod -R 755 /opt/frontend \
&& convert /opt/frontend/web/images/icons/novnc-ios-180.png -resize "128x128" /tmp/steam-headless.png \
&& xdg-icon-resource install --novendor --size 128 /tmp/steam-headless.png \
&& \
echo "**** Section cleanup ****" \
&& rm -f /tmp/steam-headless.png
# Install Websockify
ARG WEBSOCKETIFY_VERSION=0.11.0
RUN \
echo "**** Update apt database ****" \
&& apt-get update \
&& \
echo "**** Install Websockify dependencies ****" \
&& apt-get install -y \
python3-numpy \
python3-requests \
python3-jwcrypto \
python3-redis \
&& \
echo "**** Fetch Websockify ****" \
&& cd /tmp \
&& wget -O /tmp/websockify.tar.gz https://github.com/novnc/websockify/archive/v${WEBSOCKETIFY_VERSION}.tar.gz \
&& \
echo "**** Extract Websockify ****" \
&& cd /tmp \
&& tar -xvf /tmp/websockify.tar.gz \
&& \
echo "**** Install Websockify to Web Frontend path ****" \
&& cd /tmp \
&& mv -v /tmp/websockify-${WEBSOCKETIFY_VERSION} /opt/frontend/utils/websockify \
&& \
echo "**** Section cleanup ****" \
&& apt-get clean autoclean -y \
&& apt-get autoremove -y \
&& rm -rf \
/var/lib/apt/lists/* \
/tmp/websockify-* \
/tmp/websockify.tar.gz
# Setup audio streaming deps # Setup audio streaming deps
RUN \ RUN \
echo "**** Update apt database ****" \ echo "**** Update apt database ****" \
@@ -505,6 +436,55 @@ RUN \
&& \ && \
echo echo
# Install Web Frontend
ARG NODE_VERSION="v20"
ARG FRONTEND_VERSION=5ede778
RUN \
echo "**** Install Node ${NODE_VERSION} ****" \
&& mkdir -p /tmp/nodejs \
&& rm -rf /opt/nodejs \
&& wget -qO /tmp/nodejs/nodejs.tar.xz \
"https://nodejs.org/dist/latest-${NODE_VERSION:?}.x/node-$(wget -qO- https://nodejs.org/dist/latest-${NODE_VERSION:?}.x/ | sed -nE 's|.*>node-(.*)-linux-x64\.tar.xz</a>.*|\1|p')-linux-x64.tar.xz" \
&& tar -xJf /tmp/nodejs/nodejs.tar.xz -C /tmp/nodejs --strip-components=1 \
&& mv /tmp/nodejs /opt/nodejs \
&& ln -sf /opt/nodejs/bin/node /usr/local/bin/node \
&& ln -sf /opt/nodejs/bin/npm /usr/local/bin/npm \
&& ln -sf /opt/nodejs/bin/npx /usr/local/bin/npx \
&& \
echo "**** Fetch Web Frontend ****" \
&& mkdir -p /opt \
&& cd /opt \
&& rm -rf /opt/frontend \
&& git clone https://github.com/Steam-Headless/frontend.git --branch dev-SHUI /opt/frontend \
&& cd /opt/frontend \
&& git checkout ${FRONTEND_VERSION} 2> /dev/null \
&& git submodule init \
&& git submodule update --depth 1 --recursive \
&& rm -rf /opt/frontend/.git \
&& \
echo "**** Install SHUIv2 requirements ****" \
&& cd /opt/frontend \
&& python3 -m venv --symlinks ./venv \
&& ./venv/bin/python3 -m pip install --no-cache-dir --upgrade pip \
&& ./venv/bin/python3 -m pip install --no-cache-dir -r ./requirements.txt \
&& \
echo "**** Build SHUIv2 vue ****" \
&& cd /opt/frontend \
&& cd ./shui2/shui-vue/ \
&& npm ci \
&& npm run build \
&& cd /opt/frontend \
&& cd ./shui2/server/ \
&& npm ci \
&& \
echo "**** Install Web Frontend icon ****" \
&& cd /opt/frontend \
&& convert ./web/images/icons/novnc-ios-180.png -resize "128x128" /tmp/steam-headless.png \
&& xdg-icon-resource install --novendor --size 128 /tmp/steam-headless.png \
&& \
echo "**** Section cleanup ****" \
&& rm -f /tmp/steam-headless.png
# TODO: Deprecate neko # TODO: Deprecate neko
# Install Neko server # Install Neko server
COPY --from=m1k1o/neko:base /usr/bin/neko /usr/bin/neko COPY --from=m1k1o/neko:base /usr/bin/neko /usr/bin/neko

View File

@@ -18,7 +18,7 @@ stderr_logfile_backups=7
priority=30 priority=30
autostart=false autostart=false
autorestart=true autorestart=true
user=root user=%(ENV_USER)s
command=/opt/frontend/utils/run.sh --web-port %(ENV_PORT_NOVNC_WEB)s --remote-host localhost --vnc-port %(ENV_PORT_VNC)s --audio-port %(ENV_PORT_AUDIO_STREAM)s command=/opt/frontend/utils/run.sh --web-port %(ENV_PORT_NOVNC_WEB)s --remote-host localhost --vnc-port %(ENV_PORT_VNC)s --audio-port %(ENV_PORT_AUDIO_STREAM)s
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s" environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s"
stopsignal=INT stopsignal=INT