added lite version

This commit is contained in:
AndrewMarchukov 2022-11-21 01:59:20 +04:00
parent 5e8f768df8
commit 4b34394d62
4 changed files with 58 additions and 4 deletions

View file

@ -23,3 +23,12 @@ jobs:
context: .
push: true
tags: andrewmhub/insurgency-sandstorm:latest
-
name: Build and push lite
id: build-lite
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile.lite
push: true
tags: andrewmhub/insurgency-sandstorm:lite

View file

@ -44,6 +44,16 @@ jobs:
context: .
push: true
tags: andrewmhub/insurgency-sandstorm:latest
-
name: Build and push lite
id: build-lite
if: steps.status.outcome == 'success'
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile.lite
push: true
tags: andrewmhub/insurgency-sandstorm:lite
- name: login to git
if: steps.status.outcome == 'success'
run: |

25
Dockerfile.lite Normal file
View file

@ -0,0 +1,25 @@
FROM ubuntu:jammy-20221101
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install --no-install-recommends --no-install-suggests -y \
lib32gcc-s1 \
curl \
ca-certificates \
locales && \
apt-get -y upgrade && \
locale-gen "en_US.UTF-8" && \
export LC_ALL="en_US.UTF-8" && \
useradd -m steam && \
su "steam" -c \
"mkdir -p /home/steam/steamcmd && cd /home/steam/steamcmd && \
curl -o steamcmd_linux.tar.gz "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" && \
tar zxf steamcmd_linux.tar.gz && \
rm steamcmd_linux.tar.gz" && \
apt-get remove --purge -y curl && \
apt-get clean autoclean && \
apt-get autoremove -y && \
rm -rf /var/lib/{apt,dpkg} /var/{cache,log} && \
su "steam" -c "mkdir -p /home/steam/steamcmd/sandstorm/Insurgency/Saved/SaveGames"
WORKDIR /home/steam/steamcmd
USER steam
ENTRYPOINT /home/steam/steamcmd/steamcmd.sh +force_install_dir /home/steam/steamcmd/sandstorm/ +login anonymous +app_update 581330 validate +quit && \
/home/steam/steamcmd/sandstorm/Insurgency/Binaries/Linux/InsurgencyServer-Linux-Shipping ${LAUNCH_SERVER_ENV} -hostname="$HOSTNAME" -Port=$PORT -QueryPort=$QUERYPORT

View file

@ -20,6 +20,8 @@ fixed steam warning in dockerfile "Please use force_install_dir before logon!"
changed readme
changed ENTRYPOINT now you can use LAUNCH_SERVER_ENV to set map
new options on ini files
Nov, 2022
added lite version, because it's become so beefy
```
</details>
@ -37,12 +39,22 @@ cd directory where ```Dockerfile```
## How to launch Insurgency Sandstorm dedicated server
Running multiple instances (use PORT, QUERYPORT and HOSTNAME) and LAUNCH_SERVER_ENV in [modmap.env](https://github.com/AndrewMarchukov/insurgency-sandstorm-server-dockerize/blob/master/modmap.env):
```
docker run -d --restart always --env-file /home/user/coop-modmap/modmap.env \
docker run -d --restart unless-stopped --env-file /home/user/coop-modmap/modmap.env \
--name sandstorm-modmap --net=host \
-v /home/user/coop-modmap/Mods:/home/steam/steamcmd/sandstorm/Insurgency/Mods:rw \
-v /home/user/coop-modmap/config/ini:/home/steam/steamcmd/sandstorm/Insurgency/Saved/Config/LinuxServer:ro \
-v /home/user/coop-modmap/config/txt:/home/steam/steamcmd/sandstorm/Insurgency/Config/Server:ro andrewmhub/insurgency-sandstorm:latest
```
#### Lite version
All game data will be stored on disk
```
docker run -d --restart unless-stopped --env-file /home/user/coop-modmap/modmap.env \
--name sandstorm-modmap --net=host \
-v /home/user/my_dir:/home/steam/steamcmd/sandstorm:rw \
andrewmhub/insurgency-sandstorm:lite
```
Examples config files in directory [config](https://github.com/AndrewMarchukov/insurgency-sandstorm-server-dockerize/tree/master/config)
Optional launch options:
@ -51,8 +63,6 @@ Optional launch options:
```-nominidumps``` some crash dump handler that uploads crash information to insurgency devs servers this option disables it
### docker-compose.yml example
```dockerfile
version: '3.7'