Files
gym-tracker/kubernetes/deployment.yaml
2025-10-31 00:32:08 +01:00

63 lines
1.5 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: gym-tracker
labels:
app: gym-tracker
spec:
replicas: 1 # Single replica since we're using SQLite with file-based storage
selector:
matchLabels:
app: gym-tracker
template:
metadata:
labels:
app: gym-tracker
spec:
containers:
- name: gym-tracker
image: gym-tracker:latest # Update with your registry/image name
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 80
protocol: TCP
- name: api
containerPort: 3000
protocol: TCP
env:
- name: NODE_ENV
value: "production"
- name: PORT
value: "3000"
volumeMounts:
- name: data
mountPath: /app/data
livenessProbe:
httpGet:
path: /health
port: 80
initialDelaySeconds: 15
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /health
port: 80
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 3
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "500m"
volumes:
- name: data
persistentVolumeClaim:
claimName: gym-tracker-data