51 lines
No EOL
1.4 KiB
YAML
51 lines
No EOL
1.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: gohorse-backoffice-dev
|
|
namespace: gohorsejobsdev
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: gohorse-backoffice-dev
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: gohorse-backoffice-dev
|
|
env: development
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: forgejo-registry
|
|
initContainers:
|
|
- name: set-mtu
|
|
image: busybox
|
|
# CORREÇÃO: Usando ${MTU_VALUE} para que o ifconfig receba o número do MTU
|
|
command: ['sh', '-c', 'ifconfig eth0 mtu ${MTU_VALUE} || true']
|
|
env:
|
|
- name: MTU_VALUE
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: backend-secrets
|
|
key: MTU
|
|
securityContext:
|
|
privileged: true
|
|
containers:
|
|
- name: backoffice
|
|
image: pipe.gohorsejobs.com/bohessefm/backoffice:latest
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 3001
|
|
# Injeta todas as variáveis (DATABASE_URL, JWT, etc.) automaticamente
|
|
envFrom:
|
|
- secretRef:
|
|
name: backend-secrets
|
|
env:
|
|
- name: NODE_TLS_REJECT_UNAUTHORIZED
|
|
value: "0"
|
|
resources:
|
|
requests:
|
|
memory: "800Mi"
|
|
cpu: "300m"
|
|
limits:
|
|
memory: "2Gi"
|
|
cpu: "800m" |