feat(server): Add startup script (#63)

## Description

**What issue are you solving (or what feature are you adding) and how
are you doing it?**

We start the container using supervisord, which is limiting as the user
has no way of telling the container what game to run. So, the idea is to
run like so: `docker run... ghcr.io/netrisdotme/netris/server:<tag>
netris-proton /game/yourgame.exe`


Co-authored by @djpremier
This commit is contained in:
Wanjohi
2024-05-25 00:24:45 +03:00
committed by GitHub
parent e6fa6ea6e1
commit 204730450c
8 changed files with 54 additions and 2 deletions

5
dev/run.sh Normal file
View File

@@ -0,0 +1,5 @@
#!/bin/bash -e
NAME="${NAME:-$(head /dev/urandom | LC_ALL=C tr -dc 'a-zA-Z0-9' | head -c 16)}"
# docker run --gpus all --device=/dev/dri --rm -it --entrypoint /bin/bash -e SESSION_ID=G4r06Kc8vDmwIXPG -v "$(pwd)":/game -p 8080:8080/udp --cap-add=SYS_NICE --cap-add=SYS_ADMIN server
docker run --gpus all --device=/dev/dri --rm -it --entrypoint /bin/bash -e SESSION_ID=$NAME -v "$(pwd)":/game -p 8080:8080/udp --cap-add=SYS_NICE --cap-add=SYS_ADMIN server