gcloud-lab/apps/base/customer1/trading-platform/dashboard/deployment.yaml
Sirius Devops 605e15d55c fix(dashboard): add tmp volumeMount for readOnlyRootFilesystem
Next.js standalone mode needs a writable /tmp directory for cache, temp files, and logs.

With , the container was crashing after "Ready in 228ms" (EOF in log stream).

Added the standard emptyDir volumeMount used by other services.

This should make the dashboard stable and accessible on tailnet.
2026-05-25 06:17:28 +00:00

85 lines
2.1 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
volumeMounts:
- name: tmp
mountPath: /tmp
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
volumes:
- name: tmp
emptyDir: {}