a07522a189
React 19 SPA + node:http/node:sqlite API in one container. Card data is baked into the image from a Scryfall bulk build, so the runtime never calls Scryfall. No server-side user state: decks live in the browser and travel in the share URL, which is why there is no PVC and replicas: 1 is correct. Adds a README covering the architecture and the reasoning behind it, and publishes the project skills under .claude/skills/. Co-Authored-By: Claude Code <noreply@anthropic.com>
89 lines
2.1 KiB
YAML
89 lines
2.1 KiB
YAML
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: magik
|
|
labels:
|
|
app.kubernetes.io/part-of: magik
|
|
---
|
|
# The app holds no user data. Decks live in the browser and travel in the URL,
|
|
# and the SQLite card index is baked into the image, so there is no PVC: a new
|
|
# release replaces the old one outright with nothing to migrate or restore.
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: magic
|
|
namespace: magik
|
|
labels:
|
|
app.kubernetes.io/name: magic
|
|
app.kubernetes.io/part-of: magik
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: magic
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: magic
|
|
app.kubernetes.io/part-of: magik
|
|
spec:
|
|
nodeSelector:
|
|
kubernetes.io/hostname: kubernets
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 10001
|
|
runAsGroup: 10001
|
|
fsGroup: 10001
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: magic
|
|
image: localhost:32000/magic:latest
|
|
imagePullPolicy: IfNotPresent
|
|
env:
|
|
- name: PORT
|
|
value: '8080'
|
|
- name: HOST
|
|
value: 0.0.0.0
|
|
ports:
|
|
- name: http
|
|
containerPort: 8080
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /api/health
|
|
port: http
|
|
initialDelaySeconds: 3
|
|
periodSeconds: 5
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /api/health
|
|
port: http
|
|
initialDelaySeconds: 20
|
|
periodSeconds: 15
|
|
resources:
|
|
requests:
|
|
cpu: 50m
|
|
memory: 192Mi
|
|
ephemeral-storage: 64Mi
|
|
limits:
|
|
cpu: '1'
|
|
memory: 512Mi
|
|
ephemeral-storage: 256Mi
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: magic
|
|
namespace: magik
|
|
labels:
|
|
app.kubernetes.io/name: magic
|
|
app.kubernetes.io/part-of: magik
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
app.kubernetes.io/name: magic
|
|
ports:
|
|
- name: http
|
|
port: 80
|
|
targetPort: http
|