Dashboard-Automatizase/k8s/deployment.yaml
Luis 2015b130d0 feat: add Dockerfile and Kubernetes manifests for deployment
- Create multi-stage Dockerfile with node:20-alpine
- Add .dockerignore for optimized build context
- Create Kubernetes manifests (deployment, service, ingress, secret)
- Add health check endpoint at /api/health
- Configure next.config.ts with standalone output
- Add comprehensive deployment documentation in README-DEPLOY.md

Story: 4.1 - Criar Dockerfile e Manifests Kubernetes para Deploy

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 19:57:26 -03:00

68 lines
1.5 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: portal
namespace: automatizase
labels:
app: portal
environment: production
spec:
replicas: 1 # Alta disponibilidade
selector:
matchLabels:
app: portal
template:
metadata:
labels:
app: portal
spec:
containers:
- name: nextjs
image: registry.automatizase.com/portal:latest
imagePullPolicy: Always
ports:
- containerPort: 3100
name: http
protocol: TCP
# Carregar variáveis de ambiente do Secret
envFrom:
- secretRef:
name: portal-secrets
# Resource limits e requests
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "500m"
# Liveness probe - verifica se container está vivo
livenessProbe:
httpGet:
path: /api/health
port: 3100
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
# Readiness probe - verifica se container está pronto para receber tráfego
readinessProbe:
httpGet:
path: /api/health
port: 3100
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 3
# Restart policy
restartPolicy: Always