- Gitea Actions workflow: build, push sha-tagged image, apply kustomize, wait for rollout with auto-rollback - Deploy to personal-site namespace, served at jesseinit.dev with TLS - Run container as non-root and bind to 0.0.0.0 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
71 lines
1.6 KiB
YAML
71 lines
1.6 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: jesseinit-portfolio
|
|
labels:
|
|
app: jesseinit-portfolio
|
|
spec:
|
|
replicas: 2
|
|
revisionHistoryLimit: 5
|
|
strategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
maxUnavailable: 0
|
|
maxSurge: 1
|
|
selector:
|
|
matchLabels:
|
|
app: jesseinit-portfolio
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: jesseinit-portfolio
|
|
spec:
|
|
containers:
|
|
- name: portfolio
|
|
image: jesseinit-portfolio:latest
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 3000
|
|
name: http
|
|
env:
|
|
- name: NODE_ENV
|
|
value: "production"
|
|
- name: HOSTNAME
|
|
value: "0.0.0.0"
|
|
- name: PORT
|
|
value: "3000"
|
|
- name: NEXT_TELEMETRY_DISABLED
|
|
value: "1"
|
|
envFrom:
|
|
- configMapRef:
|
|
name: jesseinit-portfolio-config
|
|
optional: true
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 1000
|
|
allowPrivilegeEscalation: false
|
|
resources:
|
|
requests:
|
|
memory: "128Mi"
|
|
cpu: "100m"
|
|
limits:
|
|
memory: "512Mi"
|
|
cpu: "500m"
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 3000
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 3000
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
timeoutSeconds: 3
|
|
failureThreshold: 3
|
|
restartPolicy: Always
|