From 46fe87a715017b355894c6033a689b76157b5767 Mon Sep 17 00:00:00 2001 From: Wanjohi <71614375+wanjohiryan@users.noreply.github.com> Date: Sat, 25 May 2024 00:52:46 +0300 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(server):=20Add=20warp-input=20?= =?UTF-8?q?server=20(#64)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description **What issue are you solving (or what feature are you adding) and how are you doing it?** We need to remove the inputtino server, and replace it with `warp-input` server, which is developed in-house and it works. --- .scripts/supervisord.conf | 15 ++++++++++++++- server.Dockerfile | 9 +++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.scripts/supervisord.conf b/.scripts/supervisord.conf index dfa32fb5..ad0432f7 100644 --- a/.scripts/supervisord.conf +++ b/.scripts/supervisord.conf @@ -28,4 +28,17 @@ stopsignal=INT autostart=true autorestart=true redirect_stderr=true -priority=10 \ No newline at end of file +priority=10 + +[program:warp-input] +command=bash -c "until [ -S \"/tmp/.X11-unix/X${DISPLAY/:/}\" ]; do sleep 1; done; /usr/bin/warp-input --namespace $SESSION_ID --bind '[::]:8080' https://fst.so:4443" +logfile=/tmp/warp-input.log +pidfile=/tmp/warp-input.pid +stopsignal=INT +user=%(ENV_USER)s +environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY=":0",SESSION_ID="%(ENV_SESSION_ID)s" +autostart=true +autorestart=true +startretries=100 +redirect_stderr=true +priority=20 \ No newline at end of file diff --git a/server.Dockerfile b/server.Dockerfile index a5042f65..8e893df3 100644 --- a/server.Dockerfile +++ b/server.Dockerfile @@ -15,6 +15,7 @@ RUN apt-get update -y \ && add-apt-repository -y multiverse \ && apt-get install -y --no-install-recommends \ libxnvctrl0 \ + libxdo-dev \ libevdev2 \ mangohud \ gamescope \ @@ -68,8 +69,8 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ && ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime && echo "$TZ" > /etc/timezone COPY --from=ghcr.io/wanjohiryan/netris/warp:nightly /usr/bin/warp /usr/bin/ -COPY --from=ghcr.io/games-on-whales/inputtino:stable /inputtino/input-server /inputtino/input-server -RUN chmod +x /usr/bin/warp +COPY --from=ghcr.io/netrisdotme/netris/warp-input:nightly /usr/bin/warp-input /usr/bin/warp-input +RUN chmod +x /usr/bin/warp /usr/bin/warp-input COPY .scripts /etc/ RUN chmod 755 /etc/supervisord.conf /etc/entrypoint.sh /etc/startup.sh @@ -78,8 +79,8 @@ ENV SHELL=/bin/bash \ USER=${USERNAME} #For mounting the game into the container VOLUME [ "/game" ] -#For inputtino server -EXPOSE 8080 +#For warp-input server +EXPOSE 8080/udp WORKDIR /home/${USERNAME}