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}