docs: Adiciona documentação completa das correções realizadas
This commit is contained in:
198
CORRECOES-REALIZADAS.md
Normal file
198
CORRECOES-REALIZADAS.md
Normal file
@@ -0,0 +1,198 @@
|
|||||||
|
# 🎉 Correções Realizadas - 21/11/2025
|
||||||
|
|
||||||
|
## ✅ Problemas Resolvidos
|
||||||
|
|
||||||
|
### 1. 🔐 Senha do Admin Resetada
|
||||||
|
- **Email:** `scorrea69@gmail.com`
|
||||||
|
- **Nova Senha:** `Admin@2024`
|
||||||
|
- ✅ Login funcionando normalmente
|
||||||
|
|
||||||
|
### 2. 🔧 Sistema "Esqueci Minha Senha" Corrigido
|
||||||
|
- ✅ Corrigidos nomes de colunas SQL (expires_at → expiresAt)
|
||||||
|
- ✅ Link de reset agora aparece na tela
|
||||||
|
- ✅ Sistema totalmente funcional
|
||||||
|
|
||||||
|
### 3. 🚨 PROBLEMA CRÍTICO: Conflito de Portas Nginx/Gitea
|
||||||
|
**Problema:**
|
||||||
|
- Gitea e PDI Maker estavam configurados para a mesma porta (3000)
|
||||||
|
- `meurepositorio.com` estava abrindo `pdimaker.com.br`
|
||||||
|
|
||||||
|
**Solução:**
|
||||||
|
- ✅ Gitea movido para porta **3001**
|
||||||
|
- ✅ PDI Maker mantido na porta **3000**
|
||||||
|
- ✅ Nginx reconfigurado corretamente
|
||||||
|
- ✅ Ambos os domínios funcionando perfeitamente
|
||||||
|
|
||||||
|
## 📊 Configuração Final
|
||||||
|
|
||||||
|
### Portas
|
||||||
|
```
|
||||||
|
- Gitea: localhost:3001 → https://meurepositorio.com
|
||||||
|
- PDI Maker: localhost:3000 → https://pdimaker.com.br
|
||||||
|
- API: localhost:4000 → https://api.pdimaker.com.br
|
||||||
|
- PostgreSQL: localhost:5432
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arquivos Modificados
|
||||||
|
|
||||||
|
#### Sistema de Recuperação de Senha
|
||||||
|
- `/var/www/pdimaker/frontend/app/api/auth/forgot-password/route.ts` ✅
|
||||||
|
- `/var/www/pdimaker/frontend/app/api/auth/reset-password/route.ts` ✅
|
||||||
|
- `/var/www/pdimaker/frontend/app/forgot-password/page.tsx` ✅
|
||||||
|
- `/var/www/pdimaker/frontend/app/reset-password/page.tsx` ✅
|
||||||
|
|
||||||
|
#### Configuração Gitea
|
||||||
|
- `/root/gitea/docker-compose.yml` - Porta alterada: 3000 → 3001
|
||||||
|
- `/root/gitea/data/gitea/conf/app.ini` - HTTP_PORT: 3001
|
||||||
|
- `/etc/nginx/sites-available/gitea` - proxy_pass: localhost:3001
|
||||||
|
|
||||||
|
#### Documentação
|
||||||
|
- `SOLUCAO-LOGIN-ADMIN.md` - Guia de solução de login
|
||||||
|
- `CORRECOES-REALIZADAS.md` - Este arquivo
|
||||||
|
|
||||||
|
## 🔄 Commit Criado
|
||||||
|
|
||||||
|
```bash
|
||||||
|
commit 45f819b
|
||||||
|
Author: [Sistema]
|
||||||
|
Date: Thu Nov 21 2025
|
||||||
|
|
||||||
|
fix: Corrige sistema de recuperação de senha (Esqueci minha senha)
|
||||||
|
|
||||||
|
- Corrige nomes de colunas SQL (expires_at -> expiresAt)
|
||||||
|
- Link de reset agora aparece na tela
|
||||||
|
- Adiciona documentação de solução
|
||||||
|
- Sistema totalmente funcional
|
||||||
|
|
||||||
|
5 files changed, 827 insertions(+)
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📤 Como Fazer Push para o Gitea
|
||||||
|
|
||||||
|
### Opção 1: Push via Navegador (Mais Simples)
|
||||||
|
|
||||||
|
1. Acesse: https://meurepositorio.com/sergio.correa/PDI-MAKER
|
||||||
|
2. Clique em **"Upload File"** ou **"Settings"** → **"Git Hooks"**
|
||||||
|
3. Siga as instruções na interface web
|
||||||
|
|
||||||
|
### Opção 2: Push via Terminal com Credenciais
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /var/www/pdimaker
|
||||||
|
|
||||||
|
# O Git vai pedir usuário e senha do Gitea
|
||||||
|
git push -u origin main
|
||||||
|
|
||||||
|
# Quando pedir:
|
||||||
|
# Username: sergio.correa
|
||||||
|
# Password: [sua senha do Gitea]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Opção 3: Push via SSH (Recomendado)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. Gerar chave SSH (se não tiver)
|
||||||
|
ssh-keygen -t ed25519 -C "scorrea69@gmail.com"
|
||||||
|
|
||||||
|
# 2. Copiar chave pública
|
||||||
|
cat ~/.ssh/id_ed25519.pub
|
||||||
|
|
||||||
|
# 3. Adicionar no Gitea:
|
||||||
|
# https://meurepositorio.com/user/settings/keys
|
||||||
|
# Colar a chave pública
|
||||||
|
|
||||||
|
# 4. Atualizar remote para SSH
|
||||||
|
cd /var/www/pdimaker
|
||||||
|
git remote set-url origin git@meurepositorio.com:sergio.correa/PDI-MAKER.git
|
||||||
|
|
||||||
|
# 5. Fazer push
|
||||||
|
git push -u origin main
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🌐 Verificação
|
||||||
|
|
||||||
|
### Testar meurepositorio.com (Gitea)
|
||||||
|
```bash
|
||||||
|
curl -sL https://meurepositorio.com | grep -i gitea
|
||||||
|
# Deve retornar HTML do Gitea
|
||||||
|
```
|
||||||
|
|
||||||
|
### Testar pdimaker.com.br (PDI Maker)
|
||||||
|
```bash
|
||||||
|
curl -sL https://pdimaker.com.br | grep -i pdimaker
|
||||||
|
# Deve retornar HTML do PDI Maker
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🔧 Comandos de Manutenção
|
||||||
|
|
||||||
|
### Reiniciar Gitea
|
||||||
|
```bash
|
||||||
|
cd /root/gitea
|
||||||
|
docker-compose restart
|
||||||
|
```
|
||||||
|
|
||||||
|
### Reiniciar PDI Maker
|
||||||
|
```bash
|
||||||
|
pm2 restart pdimaker-web
|
||||||
|
```
|
||||||
|
|
||||||
|
### Reiniciar Nginx
|
||||||
|
```bash
|
||||||
|
systemctl reload nginx
|
||||||
|
```
|
||||||
|
|
||||||
|
### Ver Logs
|
||||||
|
```bash
|
||||||
|
# Gitea
|
||||||
|
docker logs gitea -f
|
||||||
|
|
||||||
|
# PDI Maker
|
||||||
|
pm2 logs pdimaker-web
|
||||||
|
|
||||||
|
# Nginx
|
||||||
|
tail -f /var/log/nginx/error.log
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📝 Configuração do Repositório Git
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /var/www/pdimaker
|
||||||
|
|
||||||
|
# Repositório configurado:
|
||||||
|
git remote -v
|
||||||
|
# origin https://meurepositorio.com/sergio.correa/PDI-MAKER.git (fetch)
|
||||||
|
# origin https://meurepositorio.com/sergio.correa/PDI-MAKER.git (push)
|
||||||
|
|
||||||
|
# Branch atual:
|
||||||
|
git branch
|
||||||
|
# * main
|
||||||
|
|
||||||
|
# Último commit:
|
||||||
|
git log --oneline -1
|
||||||
|
# 45f819b fix: Corrige sistema de recuperação de senha
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🎯 Status Final
|
||||||
|
|
||||||
|
✅ **Login Admin** - Funcionando
|
||||||
|
✅ **Esqueci Minha Senha** - Funcionando
|
||||||
|
✅ **Gitea** - Online na porta 3001
|
||||||
|
✅ **PDI Maker** - Online na porta 3000
|
||||||
|
✅ **Nginx** - Configurado corretamente
|
||||||
|
✅ **Domínios Separados** - meurepositorio.com ≠ pdimaker.com.br
|
||||||
|
✅ **Commit Criado** - Pronto para push
|
||||||
|
⏳ **Push Pendente** - Aguardando credenciais Gitea
|
||||||
|
|
||||||
|
## 📞 Suporte
|
||||||
|
|
||||||
|
Se precisar de ajuda com alguma configuração, todos os scripts e logs estão disponíveis em:
|
||||||
|
- `/var/www/pdimaker/` - Aplicação
|
||||||
|
- `/root/gitea/` - Gitea
|
||||||
|
- `/etc/nginx/` - Configurações Nginx
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Data:** 21 de Novembro de 2025
|
||||||
|
**Tempo Total:** ~45 minutos
|
||||||
|
**Status:** ✅ TUDO FUNCIONANDO!
|
||||||
|
|
||||||
Reference in New Issue
Block a user