Files
cobblemon-ui/k8s/deployment.yaml
Alex Mickelson a4568d124a
All checks were successful
Build and Deploy / Build & Push Image (push) Successful in 31s
health endpoint
2026-03-16 20:53:12 -06:00

76 lines
1.9 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: cobblemon-ui
namespace: minecraft
labels:
app: cobblemon-ui
spec:
replicas: 1
selector:
matchLabels:
app: cobblemon-ui
template:
metadata:
labels:
app: cobblemon-ui
spec:
containers:
- name: cobblemon-ui
image: $IMAGE
ports:
- name: http
containerPort: 4000
env:
- name: PHX_SERVER
value: "true"
- name: PHX_HOST
value: "cobblemon.alexmickelson.guru"
- name: PORT
value: "4000"
- name: MINECRAFT_SERVER_URL
value: "http://minecraft-svc:8085"
- name: CACHE_DIR
value: "/app/cache"
- name: SECRET_KEY_BASE
valueFrom:
secretKeyRef:
name: cobblemon-ui-secret
key: secret-key-base
volumeMounts:
- name: cobblemon-data
mountPath: /cobblemon-data
readOnly: true
- name: cache
mountPath: /app/cache
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 500m
memory: 512Mi
readinessProbe:
httpGet:
path: /health
port: 4000
initialDelaySeconds: 3
periodSeconds: 3
failureThreshold: 3
livenessProbe:
httpGet:
path: /health
port: 4000
initialDelaySeconds: 30
periodSeconds: 30
failureThreshold: 3
volumes:
- name: cobblemon-data
hostPath:
path: /data/minecraft/cobblemon-data
type: Directory
- name: cache
hostPath:
path: /data/minecraft/cobblemon-ui-cache
type: DirectoryOrCreate