Skip to content

Commit

Permalink
✨ feat(server): Add warp-input server (#64)
Browse files Browse the repository at this point in the history
## 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.
  • Loading branch information
wanjohiryan authored May 24, 2024
1 parent 2047304 commit 46fe87a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
15 changes: 14 additions & 1 deletion .scripts/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 5 additions & 4 deletions server.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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

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

Expand Down

0 comments on commit 46fe87a

Please sign in to comment.