gcloud-lab/apps/base/customer1/trading-platform/dashboard/deployment.yaml
Sirius Devops d002a7896b fix(dashboard): align port to 3000 and probes to root path
- containerPort: 3000 (matches Next.js default + Dockerfile ENV PORT=3000)
- All probes (startup/liveness/readiness): path  (Next.js serves root when ready)
- Service targetPort: 3000

Fixes 'not ready' and 'can't reach it' (previous mismatch with 8000 + /api/health which didn't exist).

Live manifests updated (source of truth).
2026-05-25 05:55:21 +00:00

79 lines
2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: trading-dashboard
namespace: customer1
labels:
app: trading-dashboard
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: trading-dashboard
template:
metadata:
labels:
app: trading-dashboard
annotations:
checksum/config: trading-dashboard-config
spec:
terminationGracePeriodSeconds: 30
securityContext:
runAsNonRoot: true
runAsUser: 1000
fsGroup: 1000
containers:
- name: dashboard
image: ghcr.io/sirius0xdev/trading-dashboard:latest
imagePullPolicy: Always
ports:
- containerPort: 3000
name: http
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
envFrom:
- configMapRef:
name: trading-dashboard-config
env:
- name: DB_USER
valueFrom:
secretKeyRef:
name: trading-db-credentials
key: username
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: trading-db-credentials
key: password
startupProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 5
periodSeconds: 10
failureThreshold: 30
livenessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 15
periodSeconds: 30
readinessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 5
periodSeconds: 10