128 lines
3.5 KiB
YAML
128 lines
3.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: xmage
|
|
namespace: playmat
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app: xmage
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: xmage
|
|
spec:
|
|
enableServiceLinks: false
|
|
securityContext:
|
|
fsGroup: 1000
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
initContainers:
|
|
- name: prepare-data
|
|
image: busybox:1.37
|
|
command:
|
|
- sh
|
|
- -c
|
|
- mkdir -p /data/db /data/cards-db /data/logs /data/saved /data/updates && chown -R 1000:1000 /data
|
|
volumeMounts:
|
|
- name: xmage-data
|
|
mountPath: /data
|
|
containers:
|
|
- name: xmage
|
|
image: ghcr.io/arcanite24/playmat-server:master
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- name: bridge
|
|
containerPort: 17172
|
|
- name: health
|
|
containerPort: 17173
|
|
env:
|
|
- name: XMAGE_ALLOWED_ORIGINS
|
|
value: https://mtg.aleshym.co,https://playmat.aleshym.co
|
|
- name: XMAGE_PUBLIC_URL
|
|
value: https://mtg.aleshym.co
|
|
- name: XMAGE_SERVER_NAME
|
|
value: playmat
|
|
- name: XMAGE_TRUSTED_PROXIES
|
|
value: 10.42.0.0/16
|
|
- name: XMAGE_AUTH
|
|
value: "false"
|
|
- name: XMAGE_ACCESS
|
|
value: open
|
|
- name: XMAGE_CAREER
|
|
value: "on"
|
|
- name: XMAGE_SAVE_GAMES
|
|
value: "false"
|
|
- name: XMAGE_REPLAYS
|
|
value: "true"
|
|
- name: XMAGE_UPDATE_CHECK
|
|
value: "off"
|
|
- name: XMAGE_MEMORY
|
|
value: 768m
|
|
- name: XMAGE_MAX_GAME_THREADS
|
|
value: "2"
|
|
- name: XMAGE_MAX_AI_OPPONENTS
|
|
value: "2"
|
|
- name: XMAGE_GATEWAY
|
|
value: "off"
|
|
- name: XMAGE_AI_BACKEND
|
|
value: java
|
|
volumeMounts:
|
|
- name: xmage-data
|
|
mountPath: /opt/xmage/db
|
|
subPath: db
|
|
- name: xmage-data
|
|
mountPath: /opt/xmage/cards-db
|
|
subPath: cards-db
|
|
- name: xmage-data
|
|
mountPath: /opt/xmage/logs
|
|
subPath: logs
|
|
- name: xmage-data
|
|
mountPath: /opt/xmage/saved
|
|
subPath: saved
|
|
- name: xmage-data
|
|
mountPath: /opt/xmage/updates
|
|
subPath: updates
|
|
startupProbe:
|
|
exec:
|
|
command:
|
|
- bash
|
|
- -c
|
|
- exec 3<>/dev/tcp/127.0.0.1/17173
|
|
periodSeconds: 15
|
|
failureThreshold: 60
|
|
readinessProbe:
|
|
exec:
|
|
command:
|
|
- bash
|
|
- -c
|
|
- exec 3<>/dev/tcp/127.0.0.1/17172
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- bash
|
|
- -c
|
|
- exec 3<>/dev/tcp/127.0.0.1/17172
|
|
initialDelaySeconds: 120
|
|
periodSeconds: 30
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
resources:
|
|
requests:
|
|
cpu: 500m
|
|
memory: 1Gi
|
|
limits:
|
|
cpu: 1500m
|
|
memory: 2Gi
|
|
volumes:
|
|
- name: xmage-data
|
|
persistentVolumeClaim:
|
|
claimName: xmage-data
|