Skip to content

Commit

Permalink
Allow VM override (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolveix committed Sep 12, 2024
1 parent 4f3eb06 commit 5480886
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 18 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ ENV AUTOSAVENUM="5" \
SKIPUPDATE="false" \
STEAMAPPID="1690800" \
STEAMBETA="false" \
TIMEOUT="30"
TIMEOUT="30" \
VMOVERRIDE="false"

EXPOSE 7777/udp 7777/tcp

Expand Down
35 changes: 18 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,23 +163,24 @@ helm install satisfactory k8s-at-home/satisfactory -f values.yaml

## Environment Variables

| Parameter | Default | Function |
|-------------------------|:---------:|-----------------------------------------------------|
| `AUTOSAVENUM` | `5` | number of rotating autosave files |
| `DEBUG` | `false` | for debugging the server |
| `DISABLESEASONALEVENTS` | `false` | disable the FICSMAS event (you miserable bastard) |
| `MAXOBJECTS` | `2162688` | set the object limit for your server |
| `MAXPLAYERS` | `4` | set the player limit for your server |
| `MAXTICKRATE` | `30` | set the maximum sim tick rate for your server |
| `PGID` | `1000` | set the group ID of the user the server will run as |
| `PUID` | `1000` | set the user ID of the user the server will run as |
| `ROOTLESS` | `false` | run the container as a non-root user |
| `SERVERGAMEPORT` | `7777` | set the game's port |
| `SERVERIP` | `0.0.0.0` | set the game's ip (usually not needed) |
| `SERVERSTREAMING` | `true` | toggle whether the game utilizes asset streaming |
| `SKIPUPDATE` | `false` | avoid updating the game on container start/restart |
| `STEAMBETA` | `false` | set experimental game version |
| `TIMEOUT` | `30` | set client timeout (in seconds) |
| Parameter | Default | Function |
|-------------------------|:---------:|-----------------------------------------------------------|
| `AUTOSAVENUM` | `5` | number of rotating autosave files |
| `DEBUG` | `false` | for debugging the server |
| `DISABLESEASONALEVENTS` | `false` | disable the FICSMAS event (you miserable bastard) |
| `MAXOBJECTS` | `2162688` | set the object limit for your server |
| `MAXPLAYERS` | `4` | set the player limit for your server |
| `MAXTICKRATE` | `30` | set the maximum sim tick rate for your server |
| `PGID` | `1000` | set the group ID of the user the server will run as |
| `PUID` | `1000` | set the user ID of the user the server will run as |
| `ROOTLESS` | `false` | run the container as a non-root user |
| `SERVERGAMEPORT` | `7777` | set the game's port |
| `SERVERIP` | `0.0.0.0` | set the game's ip (usually not needed) |
| `SERVERSTREAMING` | `true` | toggle whether the game utilizes asset streaming |
| `SKIPUPDATE` | `false` | avoid updating the game on container start/restart |
| `STEAMBETA` | `false` | set experimental game version |
| `TIMEOUT` | `30` | set client timeout (in seconds) |
| `VMOVERRIDE` | `false` | skips the CPU model check (should not ordinarily be used) |

## Experimental Branch

Expand Down
12 changes: 12 additions & 0 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ HDD: $(df -h | awk '$NF=="/"{printf "%dGB/%dGB (%s used)\n", $3,$2,$5}')"
exit 1
fi

# check that the cpu isn't generic, as Satisfactory will normally crash
if [[ "$VMOVERRIDE" == "true" ]]; then
printf "${MSGWARNING} VMOVERRIDE is enabled, skipping CPU model check. Satisfactory might crash!\\n"
else
# Perform CPU model check
if [[ "$cpu_model" == "Common KVM processor" || "$cpu_model" == *"QEMU"* ]]; then
printf "${MSGERROR} Your CPU model is configured as \"${cpu_model}\", which will cause Satisfactory to crash.\\nIf you have control over your hypervisor (ESXi, Proxmox, etc.), you should be able to easily change this.\\nOtherwise contact your host/administrator for assistance.\\n"
exit 1
fi
fi


# check that the cpu isn't generic, as Satisfactory will crash
cpu_model=$(lscpu | grep 'Model name:' | sed 's/Model name:[[:space:]]*//g')

This comment has been minimized.

Copy link
@schildbach

schildbach Sep 12, 2024

Contributor

It may be worthwhile to grep more exactly here. On my machine, though not within Docker, this also matches the BIOS Model name line.

This comment has been minimized.

Copy link
@wolveix

wolveix Sep 12, 2024

Author Owner

Could you provide the raw output from your command, please?

This comment has been minimized.

Copy link
@schildbach

schildbach Sep 12, 2024

Contributor

I just opened a PR to improve the grep and added the output there:
#298

if [[ "$cpu_model" == "Common KVM processor" || "$cpu_model" == *"QEMU"* ]]; then
Expand Down

0 comments on commit 5480886

Please sign in to comment.