Skip to content

Commit

Permalink
add motortown files
Browse files Browse the repository at this point in the history
Signed-off-by: Xe Iaso <[email protected]>
  • Loading branch information
Xe committed Feb 3, 2025
1 parent fec13ff commit eefdc8d
Show file tree
Hide file tree
Showing 10 changed files with 888 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kube/alrest/games/motortown/1password.yaml
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"
76 changes: 76 additions & 0 deletions kube/alrest/games/motortown/deployment.yaml
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

37 changes: 37 additions & 0 deletions kube/alrest/games/motortown/docker/Dockerfile
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"]
Loading

0 comments on commit eefdc8d

Please sign in to comment.