Files
Ferrous-Solitaire/deploy/deployment.yaml
T
funman300 f6506c57e5 feat(deploy): Datasette analytics sidecar + analytics.aleshym.co ingress
Adds a Datasette container alongside the existing server in the same pod so
it can read the SQLite PVC without a second ReadWriteOnce mount. Protected
by a Traefik BasicAuth middleware at analytics.aleshym.co.

Also fixes the ArgoCD repoURL to point to the migrated Gitea hostname
(git.aleshym.co) instead of the old bare IP.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 20:17:20 -07:00

104 lines
2.6 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: solitaire-server
namespace: solitaire
spec:
replicas: 1
selector:
matchLabels:
app: solitaire-server
# SQLite is single-writer; Recreate avoids two pods owning the PVC at once.
strategy:
type: Recreate
template:
metadata:
labels:
app: solitaire-server
spec:
imagePullSecrets:
- name: gitea-registry
containers:
- name: analytics
image: datasetteproject/datasette:0.65.1
args:
- serve
- /data/sol.db
- --host
- "0.0.0.0"
- --port
- "8001"
- --readonly
- --setting
- sql_time_limit_ms
- "5000"
- --setting
- max_returned_rows
- "1000"
ports:
- containerPort: 8001
volumeMounts:
- name: db-data
mountPath: /data
readOnly: true
livenessProbe:
httpGet:
path: /-/alive
port: 8001
initialDelaySeconds: 10
periodSeconds: 30
readinessProbe:
httpGet:
path: /-/alive
port: 8001
initialDelaySeconds: 5
periodSeconds: 10
resources:
requests:
cpu: 25m
memory: 48Mi
limits:
cpu: 200m
memory: 128Mi
- name: server
image: solitaire-server
imagePullPolicy: Always
ports:
- containerPort: 8080
env:
- name: DATABASE_URL
value: sqlite:///data/sol.db
- name: JWT_SECRET
valueFrom:
secretKeyRef:
name: solitaire-secrets
key: jwt-secret
- name: SERVER_PORT
value: "8080"
volumeMounts:
- name: db-data
mountPath: /data
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 5
periodSeconds: 30
readinessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 3
periodSeconds: 10
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 500m
memory: 256Mi
volumes:
- name: db-data
persistentVolumeClaim:
claimName: solitaire-db