feat(server): Add warp-input server (#64)

## 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.
This commit is contained in:
Wanjohi
2024-05-25 00:52:46 +03:00
committed by GitHub
parent 204730450c
commit 46fe87a715
2 changed files with 19 additions and 5 deletions

View File

@@ -28,4 +28,17 @@ stopsignal=INT
autostart=true
autorestart=true
redirect_stderr=true
priority=10
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

View File

@@ -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}