-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Xe Iaso <[email protected]>
- Loading branch information
Showing
10 changed files
with
888 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: onepassword.com/v1 | ||
kind: OnePasswordItem | ||
metadata: | ||
name: motortown-secrets | ||
spec: | ||
itemPath: "vaults/Kubernetes/items/Motortown behind the wheel dedicated server" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: motortown | ||
spec: | ||
replicas: 1 | ||
strategy: | ||
type: Recreate | ||
selector: | ||
matchLabels: | ||
app: motortown | ||
template: | ||
metadata: | ||
labels: | ||
app: motortown | ||
spec: | ||
# hostNetwork: true | ||
nodeSelector: | ||
xeiaso.net/cpu: ryzen-5950X | ||
volumes: | ||
- name: datadir | ||
persistentVolumeClaim: | ||
claimName: motortown | ||
initContainers: | ||
- name: update | ||
image: steamcmd/steamcmd:latest | ||
imagePullPolicy: Always | ||
env: | ||
- name: UPDATE_COMMAND | ||
valueFrom: | ||
secretKeyRef: | ||
name: motortown-secrets | ||
key: UPDATE_COMMAND | ||
command: ["/bin/bash"] | ||
args: | ||
- "-c" | ||
- "${UPDATE_COMMAND}" | ||
volumeMounts: | ||
- mountPath: /root | ||
name: datadir | ||
nodeName: pneuma | ||
containers: | ||
- name: motortown | ||
image: ghcr.io/xe/steamcmd-wine-xvfb | ||
imagePullPolicy: Always | ||
command: | ||
- "/usr/bin/launch_server" | ||
- "wine" | ||
- "/root/motortown/MotorTown/Binaries/Win64/MotorTownServer-Win64-Shipping.exe" | ||
- "Jeju_World?listen?" | ||
- "-server" | ||
- "-log" | ||
- "-useperfthreads" | ||
- "-Port=7777" | ||
- "-QueryPort=27015" | ||
volumeMounts: | ||
- mountPath: /root | ||
name: datadir | ||
ports: | ||
- containerPort: 7777 | ||
hostPort: 7777 | ||
protocol: TCP | ||
name: game-tcp | ||
- containerPort: 7777 | ||
hostPort: 7777 | ||
protocol: UDP | ||
name: game-udp | ||
- containerPort: 27015 | ||
hostPort: 27015 | ||
protocol: TCP | ||
name: query-tcp | ||
- containerPort: 27015 | ||
hostPort: 27015 | ||
protocol: UDP | ||
name: query-udp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM debian:bookworm-slim | ||
|
||
USER root | ||
|
||
# enable non-free repo and i386 arch for steamcmd | ||
# apt-add-repository workaround from | ||
# https://stackoverflow.com/questions/76688863/apt-add-repository-doesnt-work-on-debian-12 | ||
RUN DEBIAN_FRONTEND=noninteractive \ | ||
apt-get update && \ | ||
apt-get install --no-install-recommends -y \ | ||
software-properties-common && \ | ||
add-apt-repository \ | ||
-U http://deb.debian.org/debian \ | ||
-c non-free-firmware \ | ||
-c non-free && \ | ||
add-apt-repository \ | ||
-U http://deb.debian.org/debian \ | ||
-c non-free-firmware \ | ||
-c non-free && \ | ||
dpkg --add-architecture i386 && \ | ||
apt-get clean | ||
|
||
# pre-accept the steam license agreement | ||
# see https://askubuntu.com/questions/506909/how-can-i-accept-the-lience-agreement-for-steam-prior-to-apt-get-install/1017487#1017487 | ||
RUN echo steam steam/question select "I AGREE" | debconf-set-selections && \ | ||
echo steam steam/license note '' | debconf-set-selections | ||
|
||
RUN DEBIAN_FRONTEND=noninteractive \ | ||
apt-get update && \ | ||
apt-get install --no-install-recommends -y \ | ||
wine wine32 wine64 xvfb xauth steamcmd x11vnc fluxbox net-tools xterm vim procps && \ | ||
apt-get clean | ||
RUN ln -s /usr/games/steamcmd /usr/bin/steamcmd | ||
|
||
COPY launch_server.sh /usr/bin/launch_server | ||
RUN chmod 0755 /usr/bin/launch_server | ||
ENTRYPOINT ["/usr/bin/launch_server"] |
Oops, something went wrong.