gohorsejobs/k8s/dev/backoffice-deployment-dev.yaml
2026-02-01 19:51:24 +00:00

61 lines
No EOL
1.8 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: gohorse-backoffice-dev
namespace: gohorsejobsdev
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: gohorse-backoffice-dev
template:
metadata:
labels:
app: gohorse-backoffice-dev
env: development
spec:
terminationGracePeriodSeconds: 10
imagePullSecrets:
- name: forgejo-registry-secret
containers:
- name: backoffice
image: pipe.gohorsejobs.com/bohessefm/backoffice:latest
imagePullPolicy: Always
ports:
- containerPort: 3001
envFrom:
- secretRef:
name: backend-secrets
env:
- name: NODE_TLS_REJECT_UNAUTHORIZED
value: "0"
# Alterado para production para ganho de performance real no framework
- name: NODE_ENV
value: "production"
# Otimização fina do Garbage Collector (GC)
- name: NODE_OPTIONS
value: "--max-old-space-size=1536 --min-semi-space-size=64 --max-semi-space-size=128"
resources:
requests:
memory: "1536Mi" # Alinhado com o max-old-space para evitar swap
cpu: "500m"
limits:
memory: "2Gi"
cpu: "1000m"
livenessProbe:
httpGet:
path: /health
port: 3001
initialDelaySeconds: 80
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /health
port: 3001
initialDelaySeconds: 40
periodSeconds: 20
timeoutSeconds: 3