-
Notifications
You must be signed in to change notification settings - Fork 1
RUNBOOK
Raphael edited this page Jan 16, 2026
·
2 revisions
Este documento contém procedimentos operacionais para o sistema Araponga.
-
Verificar Pré-requisitos:
# Verificar variáveis de ambiente env | grep -E "JWT__SIGNINGKEY|CORS__ALLOWEDORIGINS|ConnectionStrings" # Verificar health checks curl https://api.araponga.com/health
-
Executar Migrations:
dotnet ef database update --project backend/Araponga.Infrastructure --startup-project backend/Araponga.Api
-
Deploy da Aplicação:
# Docker docker-compose up -d --build # Kubernetes kubectl apply -f k8s/ kubectl rollout status deployment/araponga-api
-
Verificar Deploy:
# Health check curl https://api.araponga.com/health/ready # Verificar logs docker logs araponga-api --tail 100
-
Identificar Versão Anterior:
git log --oneline -10
-
Rollback:
# Docker docker-compose down git checkout <commit-anterior> docker-compose up -d --build # Kubernetes kubectl rollout undo deployment/araponga-api
-
Verificar Rollback:
curl https://api.araponga.com/health/ready
# Listar migrations
dotnet ef migrations list --project backend/Araponga.Infrastructure --startup-project backend/Araponga.Api
# Rollback para migration específica
dotnet ef database update <MigrationName> --project backend/Araponga.Infrastructure --startup-project backend/Araponga.Api-
Nível 1 - Equipe de Desenvolvimento
- Problemas de funcionalidade
- Bugs não críticos
- Melhorias
-
Nível 2 - DevOps/Infraestrutura
- Problemas de infraestrutura
- Performance degradada
- Problemas de deploy
-
Nível 3 - Emergência
- Sistema indisponível
- Perda de dados
- Segurança comprometida
- Desenvolvimento: dev@araponga.com
- DevOps: devops@araponga.com
- Emergência: +55 (11) 99999-9999
- Notificar Usuários (24h antes)
- Backup Completo
- Executar Manutenção
- Verificar Sistema
- Notificar Conclusão
# Logs são rotacionados automaticamente (30 dias)
# Limpeza manual se necessário:
find logs/ -name "*.log" -mtime +30 -delete# Redis
redis-cli FLUSHDB
# IMemoryCache (reiniciar aplicação)# PostgreSQL
pg_dump -h localhost -U araponga -d araponga > backup_$(date +%Y%m%d_%H%M%S).sql
# Backup automático (cron)
0 2 * * * pg_dump -h localhost -U araponga -d araponga > /backups/araponga_$(date +\%Y\%m\%d).sql# PostgreSQL
psql -h localhost -U araponga -d araponga < backup_20250115_020000.sql# Backup de appsettings.json e variáveis de ambiente
cp appsettings.Production.json appsettings.Production.json.backup
env | grep -E "JWT|CORS|ConnectionStrings" > env_backup.txt- Health checks passando (
/health/ready) - Métricas sendo coletadas (
/metrics) - Logs sendo gerados corretamente
- Cache funcionando
- Database conectado
- Redis conectado (se configurado)
- Sem erros nos logs recentes
- TROUBLESHOOTING.md - Troubleshooting comum
- INCIDENT_PLAYBOOK.md - Playbook de incidentes
- METRICS.md - Métricas disponíveis
📄 Documento completo: Ver no repositório