commit 6a483b26a084921af56bacc4b94a4cff1ceb41fc Author: Sergio Correa Date: Fri Nov 21 22:23:42 2025 +0000 πŸ“š DocumentaΓ§Γ£o inicial do projeto GITCUBO - Mapeamento completo de portas do servidor - ComparaΓ§Γ£o entre meurepositorio.com e gitcubo.com - Resumo executivo com prΓ³ximos passos - Índice de documentaΓ§Γ£o - Guia de implementaΓ§Γ£o completo Status: Fase 1 (PreparaΓ§Γ£o) concluΓ­da βœ… PrΓ³ximo: Criar estrutura de diretΓ³rios e Docker Compose diff --git a/COMPARACAO_GITEA_PROJETOS.md b/COMPARACAO_GITEA_PROJETOS.md new file mode 100644 index 0000000..0587fd7 --- /dev/null +++ b/COMPARACAO_GITEA_PROJETOS.md @@ -0,0 +1,148 @@ +# πŸ”„ ComparaΓ§Γ£o: meurepositorio.com vs gitcubo.com + +## πŸ“Š Tabela Comparativa + +| Aspecto | meurepositorio.com (Existente) | gitcubo.com (Novo) | +|---------|-------------------------------|-------------------| +| **DomΓ­nio** | meurepositorio.com | gitcubo.com | +| **IP** | 187.102.179.100 | 187.102.179.100 | +| **Porta Web** | 3001 | 3002 | +| **Porta SSH** | 222 | 223 | +| **LocalizaΓ§Γ£o** | /root/gitea/ | /root/gitcubo/ | +| **PostgreSQL** | Porta 5432 (compartilhado) | Porta 5433 (dedicado) ou 5432 (compartilhado) | +| **Container Gitea** | gitea | gitcubo | +| **Container DB** | gitea_db_1 | gitcubo_db (se dedicado) | +| **Status DNS** | βœ… Configurado | βœ… Configurado | +| **Status SSL** | βœ… Ativo | ⏳ A configurar | + +## 🎯 EstratΓ©gia de ImplementaΓ§Γ£o + +### OpΓ§Γ£o 1: PostgreSQL Compartilhado (Recomendado) +**Vantagens:** +- Menos recursos utilizados +- Mais fΓ‘cil de gerenciar +- Backup centralizado + +**ConfiguraΓ§Γ£o:** +- Criar novo database no PostgreSQL existente (porta 5432) +- Novo usuΓ‘rio: `gitcubo_user` +- Novo database: `gitcubo_db` + +### OpΓ§Γ£o 2: PostgreSQL Dedicado +**Vantagens:** +- Isolamento completo +- ConfiguraΓ§Γ΅es independentes +- Sem risco de conflito + +**ConfiguraΓ§Γ£o:** +- Novo container PostgreSQL na porta 5433 +- UsuΓ‘rio e database prΓ³prios + +## πŸ“ Estrutura de DiretΓ³rios Proposta + +``` +/root/gitcubo/ +β”œβ”€β”€ docker-compose.yml # ConfiguraΓ§Γ£o Docker +β”œβ”€β”€ data/ +β”‚ β”œβ”€β”€ gitea/ # Dados do Gitea +β”‚ β”‚ β”œβ”€β”€ conf/ +β”‚ β”‚ β”‚ └── app.ini # ConfiguraΓ§Γ£o principal +β”‚ β”‚ β”œβ”€β”€ log/ +β”‚ β”‚ β”œβ”€β”€ sessions/ +β”‚ β”‚ └── ... +β”‚ β”œβ”€β”€ git/ # RepositΓ³rios Git +β”‚ β”‚ └── repositories/ +β”‚ └── ssh/ # Chaves SSH +β”œβ”€β”€ postgres/ # Se usar PostgreSQL dedicado +β”œβ”€β”€ scripts/ +β”‚ β”œβ”€β”€ backup.sh +β”‚ β”œβ”€β”€ restore.sh +β”‚ └── manage.sh +└── README.md +``` + +## πŸ”§ DiferenΓ§as TΓ©cnicas + +### ConfiguraΓ§Γ£o Docker Compose + +**meurepositorio.com:** +```yaml +services: + gitea: + ports: + - "3001:3001" + - "222:22" +``` + +**gitcubo.com:** +```yaml +services: + gitcubo: + ports: + - "3002:3002" + - "223:22" +``` + +### ConfiguraΓ§Γ£o Nginx + +**meurepositorio.com:** +```nginx +server_name meurepositorio.com www.meurepositorio.com; +proxy_pass http://localhost:3001; +``` + +**gitcubo.com:** +```nginx +server_name gitcubo.com www.gitcubo.com; +proxy_pass http://localhost:3002; +``` + +## πŸš€ Checklist de ImplementaΓ§Γ£o + +### Fase 1: PreparaΓ§Γ£o +- [x] Verificar portas disponΓ­veis +- [x] Confirmar DNS configurado +- [ ] Decidir estratΓ©gia de banco de dados +- [ ] Criar estrutura de diretΓ³rios + +### Fase 2: InstalaΓ§Γ£o +- [ ] Criar docker-compose.yml +- [ ] Configurar PostgreSQL (novo ou existente) +- [ ] Configurar Gitea +- [ ] Testar acesso local (porta 3002) + +### Fase 3: ConfiguraΓ§Γ£o Web +- [ ] Configurar Nginx +- [ ] Obter certificado SSL (Let's Encrypt) +- [ ] Testar acesso HTTPS +- [ ] Configurar SSH (porta 223) + +### Fase 4: FinalizaΓ§Γ£o +- [ ] Criar primeiro usuΓ‘rio admin +- [ ] Configurar backup automΓ‘tico +- [ ] Documentar configuraΓ§Γ΅es +- [ ] Testar operaΓ§Γ΅es Git (clone, push, pull) + +## πŸ“ Notas Importantes + +1. **Isolamento Total:** Os dois projetos Gitea serΓ£o completamente independentes +2. **Sem Conflitos:** Portas diferentes garantem que nΓ£o haverΓ‘ conflito +3. **Mesmo Servidor:** Ambos rodam no mesmo servidor fΓ­sico (187.102.179.100) +4. **Nginx Compartilhado:** O mesmo Nginx farΓ‘ proxy reverso para ambos +5. **SSL Independente:** Cada domΓ­nio terΓ‘ seu prΓ³prio certificado SSL + +## ⚠️ Cuidados + +- NΓ£o confundir os diretΓ³rios dos dois projetos +- Sempre verificar em qual Gitea estΓ‘ trabalhando +- Fazer backup antes de qualquer alteraΓ§Γ£o +- Manter documentaΓ§Γ£o atualizada +- Monitorar uso de recursos (RAM, CPU, Disco) + +## πŸ” SeguranΓ§a + +- UsuΓ‘rios separados em cada Gitea +- Bancos de dados isolados (mesmo se no mesmo PostgreSQL) +- Chaves SSH diferentes +- Logs independentes +- Backups separados diff --git a/INDICE_DOCUMENTACAO.txt b/INDICE_DOCUMENTACAO.txt new file mode 100644 index 0000000..78c2b2c --- /dev/null +++ b/INDICE_DOCUMENTACAO.txt @@ -0,0 +1,121 @@ +╔═══════════════════════════════════════════════════════════════════════╗ +β•‘ ÍNDICE DE DOCUMENTAÇÃO - PROJETO GITCUBO.COM β•‘ +β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β• + +πŸ“š DOCUMENTOS CRIADOS +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +1. πŸ“Š MAPEAMENTO_PORTAS_SERVIDOR.md + LocalizaΓ§Γ£o: /root/MAPEAMENTO_PORTAS_SERVIDOR.md + DescriΓ§Γ£o: Mapeamento completo e detalhado de todas as portas + em uso no servidor, incluindo todos os projetos + ConteΓΊdo: + β€’ Portas pΓΊblicas (80, 443) + β€’ Portas SSH (22, 222) + β€’ Bancos de dados (5432) + β€’ Detalhes de cada aplicaΓ§Γ£o em produΓ§Γ£o + β€’ Portas disponΓ­veis para gitcubo.com + β€’ Tabela resumo de portas + β€’ PrΓ³ximos passos + +2. πŸ“‹ PORTAS_RESUMO.txt + LocalizaΓ§Γ£o: /root/PORTAS_RESUMO.txt + DescriΓ§Γ£o: Resumo visual em formato ASCII das portas + ConteΓΊdo: + β€’ Tabela de portas em uso + β€’ Portas disponΓ­veis para gitcubo.com + β€’ Status dos projetos ativos + β€’ Formato visual fΓ‘cil de ler + +3. πŸ”„ COMPARACAO_GITEA_PROJETOS.md + LocalizaΓ§Γ£o: /root/COMPARACAO_GITEA_PROJETOS.md + DescriΓ§Γ£o: ComparaΓ§Γ£o detalhada entre meurepositorio.com + e o novo projeto gitcubo.com + ConteΓΊdo: + β€’ Tabela comparativa lado a lado + β€’ EstratΓ©gias de implementaΓ§Γ£o (PostgreSQL) + β€’ Estrutura de diretΓ³rios proposta + β€’ DiferenΓ§as tΓ©cnicas (Docker, Nginx) + β€’ Checklist de implementaΓ§Γ£o completo + β€’ Notas de seguranΓ§a e cuidados + +4. πŸ“ RESUMO_EXECUTIVO_GITCUBO.txt + LocalizaΓ§Γ£o: /root/RESUMO_EXECUTIVO_GITCUBO.txt + DescriΓ§Γ£o: Resumo executivo com visΓ£o geral do projeto + ConteΓΊdo: + β€’ Mapeamento de portas concluΓ­do + β€’ Portas reservadas para gitcubo.com + β€’ Lista de projetos em produΓ§Γ£o + β€’ PrΓ³ximos passos divididos em fases + β€’ Arquivos de documentaΓ§Γ£o criados + β€’ Pontos de atenΓ§Γ£o + β€’ RecomendaΓ§Γ΅es + +5. πŸ“‘ INDICE_DOCUMENTACAO.txt + LocalizaΓ§Γ£o: /root/INDICE_DOCUMENTACAO.txt + DescriΓ§Γ£o: Este arquivo - Γ­ndice de toda documentaΓ§Γ£o + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +🎯 COMO USAR ESTA DOCUMENTAÇÃO +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +1. INÍCIO RÁPIDO + Leia primeiro: RESUMO_EXECUTIVO_GITCUBO.txt + β†’ VisΓ£o geral e prΓ³ximos passos + +2. DETALHES TΓ‰CNICOS + Consulte: MAPEAMENTO_PORTAS_SERVIDOR.md + β†’ InformaΓ§Γ΅es tΓ©cnicas completas + +3. REFERÊNCIA RÁPIDA + Use: PORTAS_RESUMO.txt + β†’ Tabela visual de portas + +4. IMPLEMENTAÇÃO + Siga: COMPARACAO_GITEA_PROJETOS.md + β†’ Guia passo a passo com checklist + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +πŸ“Œ COMANDOS ÚTEIS +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +# Ver resumo executivo +cat /root/RESUMO_EXECUTIVO_GITCUBO.txt + +# Ver mapeamento completo +cat /root/MAPEAMENTO_PORTAS_SERVIDOR.md + +# Ver tabela de portas +cat /root/PORTAS_RESUMO.txt + +# Ver comparaΓ§Γ£o dos projetos +cat /root/COMPARACAO_GITEA_PROJETOS.md + +# Ver este Γ­ndice +cat /root/INDICE_DOCUMENTACAO.txt + +# Listar todos os documentos +ls -lh /root/*.{md,txt} | grep -E '(MAPEAMENTO|PORTAS|COMPARACAO|RESUMO|INDICE)' + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +βœ… STATUS ATUAL +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +[βœ“] Mapeamento de portas concluΓ­do +[βœ“] DNS verificado (187.102.179.100) +[βœ“] Portas definidas (3002, 223) +[βœ“] DocumentaΓ§Γ£o completa criada +[ ] PrΓ³ximo: Criar estrutura de diretΓ³rios + +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +πŸ“… Data de CriaΓ§Γ£o: 21 de Novembro de 2025 +πŸ‘€ Projeto: gitcubo.com +πŸ–₯️ Servidor: 187.102.179.100 + +╔═══════════════════════════════════════════════════════════════════════╗ +β•‘ DocumentaΓ§Γ£o completa e pronta para uso! β•‘ +β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β• diff --git a/MAPEAMENTO_PORTAS_SERVIDOR.md b/MAPEAMENTO_PORTAS_SERVIDOR.md new file mode 100644 index 0000000..3b29e48 --- /dev/null +++ b/MAPEAMENTO_PORTAS_SERVIDOR.md @@ -0,0 +1,116 @@ +# πŸ“Š Mapeamento de Portas do Servidor - 187.102.179.100 +**Data:** 21 de Novembro de 2025 + +## 🌐 Portas PΓΊblicas (Nginx) +- **80** - HTTP (Nginx) - Redireciona para HTTPS +- **443** - HTTPS (Nginx) - Proxy reverso para todos os domΓ­nios + +## πŸ” Portas SSH +- **22** - SSH do sistema +- **222** - SSH do Gitea (Docker) - Para operaΓ§Γ΅es Git via SSH + +## πŸ—„οΈ Bancos de Dados +- **5432** - PostgreSQL (Docker) - Compartilhado por: + - Gitea (meurepositorio.com) + - PDI Maker + +## πŸ“¦ AplicaΓ§Γ΅es em ProduΓ§Γ£o + +### 1. **meurepositorio.com** (Gitea) +- **DomΓ­nio:** meurepositorio.com, www.meurepositorio.com +- **Porta Interna:** 3001 +- **Porta SSH:** 222 +- **Tecnologia:** Gitea (Docker) +- **LocalizaΓ§Γ£o:** /root/gitea/ +- **Banco de Dados:** PostgreSQL (porta 5432) +- **Status:** βœ… Ativo com SSL + +### 2. **pdimaker.com.br** (PDI Maker) +- **DomΓ­nios:** + - Frontend: pdimaker.com.br, www.pdimaker.com.br + - API: api.pdimaker.com.br +- **Portas Internas:** + - Frontend: 3000 (Next.js) + - Backend/API: 4000 (Node.js) +- **Tecnologia:** Next.js + Node.js +- **LocalizaΓ§Γ£o:** /var/www/pdimaker/ +- **Gerenciador:** PM2 + - pdimaker-web (PID: 3676574) + - pdimaker-api (PID: 2866741) +- **Banco de Dados:** PostgreSQL (porta 5432, Docker) +- **Status:** βœ… Ativo com SSL + +### 3. **jupter.tech** (Projeto MK37) +- **DomΓ­nio:** jupter.tech, www.jupter.tech +- **Porta Interna:** 3007 +- **Tecnologia:** Next.js v16.0.1 +- **LocalizaΓ§Γ£o:** /var/www/mk37/ +- **UsuΓ‘rio:** deploy +- **Status:** βœ… Ativo com SSL (default_server) + +### 4. **antares.ia.br** (Antares) +- **DomΓ­nio:** antares.ia.br, www.antares.ia.br +- **Porta Interna:** 8000 (Backend API) +- **Tecnologia:** Frontend estΓ‘tico + Backend Python/FastAPI +- **LocalizaΓ§Γ£o:** /var/www/antares/ +- **Estrutura:** + - Frontend: /var/www/antares/frontend/dist + - Backend: Porta 8000 +- **Status:** ⚠️ Configurado mas backend nΓ£o estΓ‘ rodando + +### 5. **projectnow.com.br** (Project Now) +- **DomΓ­nio:** projectnow.com.br, www.projectnow.com.br +- **Porta Interna:** 8081 +- **Tecnologia:** Docker +- **Status:** βœ… Ativo com SSL + +## πŸ”’ Portas Internas/Locais +- **53** - systemd-resolve (DNS local) +- **11434** - Ollama (IA/LLM) +- **44321** - PMCD (Performance Co-Pilot) +- **4330** - PMLogger +- **5201** - iperf3 (testes de rede) +- **41885** - Node (Cursor Server) +- **46501** - Node (Cursor Server) + +## πŸ†“ Portas DisponΓ­veis para Novo Projeto (gitcubo.com) + +### RecomendaΓ§Γ΅es de Portas Livres: +- **3002** - Gitea Web Interface (gitcubo.com) +- **223** - SSH do Gitea (gitcubo.com) +- **5433** - PostgreSQL dedicado (se necessΓ‘rio) + +## πŸ“‹ Resumo de Portas em Uso + +| Porta | ServiΓ§o | Projeto | +|-------|---------|---------| +| 22 | SSH Sistema | - | +| 80 | HTTP Nginx | Todos | +| 222 | SSH Gitea | meurepositorio.com | +| 443 | HTTPS Nginx | Todos | +| 3000 | Frontend | pdimaker.com.br | +| 3001 | Gitea Web | meurepositorio.com | +| 3007 | Next.js | jupter.tech | +| 4000 | API Backend | pdimaker.com.br | +| 5432 | PostgreSQL | Gitea + PDI Maker | +| 8000 | Backend API | antares.ia.br (inativo) | +| 8081 | Docker App | projectnow.com.br | + +## 🎯 PrΓ³ximos Passos para gitcubo.com + +1. βœ… DNS jΓ‘ estΓ‘ apontando para 187.102.179.100 +2. ⏳ Criar estrutura de diretΓ³rios +3. ⏳ Configurar Gitea na porta 3002 +4. ⏳ Configurar SSH na porta 223 +5. ⏳ Configurar PostgreSQL (usar o existente ou criar novo) +6. ⏳ Configurar Nginx com SSL +7. ⏳ Obter certificado SSL com Let's Encrypt + +## πŸ“ Notas Importantes + +- O servidor usa Nginx como proxy reverso para todos os projetos +- Todos os projetos em produΓ§Γ£o tΓͺm SSL configurado +- PM2 gerencia os processos Node.js do PDI Maker +- Docker Γ© usado para Gitea e alguns bancos de dados +- O projeto gitcubo.com serΓ‘ completamente separado do meurepositorio.com + diff --git a/PORTAS_RESUMO.txt b/PORTAS_RESUMO.txt new file mode 100644 index 0000000..fb778cb --- /dev/null +++ b/PORTAS_RESUMO.txt @@ -0,0 +1,46 @@ +╔════════════════════════════════════════════════════════════════════╗ +β•‘ MAPEAMENTO DE PORTAS - SERVIDOR 187.102.179.100 β•‘ +β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β• + +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ PORTAS EM USO β”‚ +β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ +β”‚ PORTA β”‚ SERVIΓ‡O β”‚ PROJETO β”‚ +β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ +β”‚ 22 β”‚ SSH Sistema β”‚ Sistema β”‚ +β”‚ 80 β”‚ HTTP Nginx β”‚ Todos (redirect HTTPS) β”‚ +β”‚ 222 β”‚ SSH Gitea β”‚ meurepositorio.com β”‚ +β”‚ 443 β”‚ HTTPS Nginx β”‚ Todos β”‚ +β”‚ 3000 β”‚ Next.js Frontend β”‚ pdimaker.com.br β”‚ +β”‚ 3001 β”‚ Gitea Web β”‚ meurepositorio.com β”‚ +β”‚ 3007 β”‚ Next.js β”‚ jupter.tech β”‚ +β”‚ 4000 β”‚ Node.js API β”‚ pdimaker.com.br (api) β”‚ +β”‚ 5432 β”‚ PostgreSQL β”‚ Gitea + PDI Maker β”‚ +β”‚ 8000 β”‚ FastAPI (inativo) β”‚ antares.ia.br β”‚ +β”‚ 8081 β”‚ Docker App β”‚ projectnow.com.br β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ PORTAS DISPONÍVEIS PARA GITCUBO.COM β”‚ +β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ +β”‚ 3002 β”‚ Gitea Web Interface (gitcubo.com) β”‚ +β”‚ 223 β”‚ SSH Gitea (gitcubo.com) β”‚ +β”‚ 5433 β”‚ PostgreSQL dedicado (opcional) β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ PROJETOS ATIVOS β”‚ +β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ +β”‚ meurepositorio.com β”‚ βœ… Gitea (porta 3001, SSH 222) β”‚ +β”‚ pdimaker.com.br β”‚ βœ… Next.js + API (3000, 4000) β”‚ +β”‚ jupter.tech β”‚ βœ… Next.js (3007) β”‚ +β”‚ projectnow.com.br β”‚ βœ… Docker (8081) β”‚ +β”‚ antares.ia.br β”‚ ⚠️ Frontend OK, Backend OFF β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + +╔════════════════════════════════════════════════════════════════════╗ +β•‘ PRΓ“XIMO: Criar estrutura para gitcubo.com β•‘ +β•‘ - DiretΓ³rio: /root/gitcubo/ β•‘ +β•‘ - Portas: 3002 (web), 223 (ssh) β•‘ +β•‘ - DNS: βœ… JΓ‘ configurado (187.102.179.100) β•‘ +β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β• diff --git a/README.md b/README.md new file mode 100644 index 0000000..3dd1cbf --- /dev/null +++ b/README.md @@ -0,0 +1,112 @@ +# 🎯 Projeto GITCUBO - DocumentaΓ§Γ£o + +DocumentaΓ§Γ£o completa para implantaΓ§Γ£o do **gitcubo.com** - Um servidor Gitea independente rodando no servidor 187.102.179.100. + +## πŸ“š Documentos DisponΓ­veis + +### 1. [RESUMO_EXECUTIVO_GITCUBO.txt](RESUMO_EXECUTIVO_GITCUBO.txt) +**Comece por aqui!** Resumo executivo com visΓ£o geral do projeto e prΓ³ximos passos. + +### 2. [MAPEAMENTO_PORTAS_SERVIDOR.md](MAPEAMENTO_PORTAS_SERVIDOR.md) +Mapeamento completo e detalhado de todas as portas em uso no servidor. + +### 3. [PORTAS_RESUMO.txt](PORTAS_RESUMO.txt) +Resumo visual em formato ASCII das portas do servidor. + +### 4. [COMPARACAO_GITEA_PROJETOS.md](COMPARACAO_GITEA_PROJETOS.md) +ComparaΓ§Γ£o detalhada entre meurepositorio.com e gitcubo.com com checklist de implementaΓ§Γ£o. + +### 5. [INDICE_DOCUMENTACAO.txt](INDICE_DOCUMENTACAO.txt) +Índice completo de toda documentaΓ§Γ£o com comandos ΓΊteis. + +## 🎯 Objetivo do Projeto + +Criar uma segunda instΓ’ncia do Gitea, completamente separada do **meurepositorio.com**, rodando em: + +- **DomΓ­nio:** gitcubo.com +- **IP:** 187.102.179.100 (mesmo servidor) +- **Porta Web:** 3002 +- **Porta SSH:** 223 +- **PostgreSQL:** Porta 5432 (compartilhado) ou 5433 (dedicado) + +## πŸ“Š Status Atual + +``` +βœ… Mapeamento de portas concluΓ­do +βœ… DNS configurado (187.102.179.100) +βœ… Portas definidas (3002, 223) +βœ… DocumentaΓ§Γ£o completa +⏳ Criar estrutura de diretΓ³rios +⏳ Configurar Docker Compose +⏳ Configurar Nginx e SSL +⏳ Subir serviΓ§o +``` + +## πŸš€ PrΓ³ximos Passos + +### Fase 1: PreparaΓ§Γ£o βœ… +- [x] Mapear portas em uso +- [x] Verificar DNS +- [x] Identificar estrutura existente +- [x] Definir portas para novo projeto +- [x] Criar documentaΓ§Γ£o + +### Fase 2: Estrutura (PrΓ³ximo) +- [ ] Criar diretΓ³rio `/root/gitcubo/` +- [ ] Copiar e adaptar `docker-compose.yml` +- [ ] Configurar PostgreSQL +- [ ] Criar estrutura de diretΓ³rios + +### Fase 3: InstalaΓ§Γ£o +- [ ] Subir containers Docker +- [ ] Configurar Gitea (app.ini) +- [ ] Testar acesso local (porta 3002) +- [ ] Verificar logs + +### Fase 4: Web & SSL +- [ ] Criar configuraΓ§Γ£o Nginx +- [ ] Ativar site no Nginx +- [ ] Obter certificado SSL (certbot) +- [ ] Testar HTTPS + +### Fase 5: FinalizaΓ§Γ£o +- [ ] Criar usuΓ‘rio admin +- [ ] Configurar SSH (porta 223) +- [ ] Testar operaΓ§Γ΅es Git +- [ ] Configurar backup +- [ ] Documentar + +## πŸ”§ Tecnologias + +- **Gitea:** Servidor Git auto-hospedado +- **Docker & Docker Compose:** ContainerizaΓ§Γ£o +- **PostgreSQL:** Banco de dados +- **Nginx:** Proxy reverso +- **Let's Encrypt:** Certificados SSL + +## πŸ“ Notas Importantes + +1. **Isolamento Total:** Os dois projetos Gitea (meurepositorio.com e gitcubo.com) sΓ£o completamente independentes +2. **Mesmo Servidor:** Ambos rodam no mesmo servidor fΓ­sico (187.102.179.100) +3. **Portas Diferentes:** Sem conflitos de porta +4. **SSL Independente:** Cada domΓ­nio terΓ‘ seu prΓ³prio certificado + +## ⚠️ Projetos Existentes no Servidor + +O servidor jΓ‘ hospeda: +- **meurepositorio.com** - Gitea (portas 3001, 222) +- **pdimaker.com.br** - Next.js + API (portas 3000, 4000) +- **jupter.tech** - Next.js (porta 3007) +- **projectnow.com.br** - Docker (porta 8081) +- **antares.ia.br** - Frontend + Backend (porta 8000) + +## πŸ“… InformaΓ§Γ΅es do Projeto + +- **Servidor:** 187.102.179.100 +- **Data de CriaΓ§Γ£o:** 21 de Novembro de 2025 +- **RepositΓ³rio:** https://meurepositorio.com/sergio.correa/GITCUBO.git + +--- + +**Powered by Gitea** | DocumentaΓ§Γ£o criada automaticamente + diff --git a/RESUMO_EXECUTIVO_GITCUBO.txt b/RESUMO_EXECUTIVO_GITCUBO.txt new file mode 100644 index 0000000..40ee15c --- /dev/null +++ b/RESUMO_EXECUTIVO_GITCUBO.txt @@ -0,0 +1,150 @@ +╔═══════════════════════════════════════════════════════════════════════╗ +β•‘ RESUMO EXECUTIVO - GITCUBO.COM β•‘ +β•‘ Servidor: 187.102.179.100 β•‘ +β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β• + +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ βœ… MAPEAMENTO DE PORTAS CONCLUÍDO ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + +πŸ“Š PORTAS IDENTIFICADAS EM USO: + β€’ 22 - SSH Sistema + β€’ 80 - HTTP Nginx (todos os projetos) + β€’ 222 - SSH Gitea (meurepositorio.com) + β€’ 443 - HTTPS Nginx (todos os projetos) + β€’ 3000 - Frontend PDI Maker + β€’ 3001 - Web Gitea (meurepositorio.com) + β€’ 3007 - Next.js (jupter.tech) + β€’ 4000 - API PDI Maker + β€’ 5432 - PostgreSQL (Gitea + PDI Maker) + β€’ 8000 - Backend Antares (inativo) + β€’ 8081 - Docker App (projectnow.com.br) + +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ 🎯 PORTAS RESERVADAS PARA GITCUBO.COM ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + + βœ“ 3002 - Interface Web Gitea + βœ“ 223 - SSH para operaΓ§Γ΅es Git + βœ“ 5433 - PostgreSQL dedicado (opcional) + +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ πŸ“ PROJETOS EM PRODUÇÃO NO SERVIDOR ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + +1. meurepositorio.com + LocalizaΓ§Γ£o: /root/gitea/ + Tecnologia: Gitea + PostgreSQL (Docker) + Portas: 3001 (web), 222 (ssh), 5432 (db) + Status: βœ… ATIVO COM SSL + +2. pdimaker.com.br + LocalizaΓ§Γ£o: /var/www/pdimaker/ + Tecnologia: Next.js + Node.js API + PostgreSQL + Portas: 3000 (frontend), 4000 (api), 5432 (db) + Gerenciador: PM2 + Status: βœ… ATIVO COM SSL + +3. jupter.tech + LocalizaΓ§Γ£o: /var/www/mk37/ + Tecnologia: Next.js v16.0.1 + Porta: 3007 + Status: βœ… ATIVO COM SSL + +4. projectnow.com.br + Tecnologia: Docker + Porta: 8081 + Status: βœ… ATIVO COM SSL + +5. antares.ia.br + LocalizaΓ§Γ£o: /var/www/antares/ + Tecnologia: Frontend estΓ‘tico + FastAPI + Porta: 8000 (backend) + Status: ⚠️ FRONTEND OK, BACKEND INATIVO + +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ πŸš€ PRΓ“XIMOS PASSOS PARA GITCUBO.COM ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + +FASE 1 - PREPARAÇÃO βœ… + [βœ“] Mapear portas em uso + [βœ“] Verificar DNS (187.102.179.100) + [βœ“] Identificar estrutura existente + [βœ“] Definir portas para novo projeto + +FASE 2 - ESTRUTURA (PRΓ“XIMO) + [ ] Criar diretΓ³rio /root/gitcubo/ + [ ] Copiar e adaptar docker-compose.yml + [ ] Configurar PostgreSQL (decidir: compartilhado ou dedicado) + [ ] Criar estrutura de diretΓ³rios + +FASE 3 - INSTALAÇÃO + [ ] Subir containers Docker + [ ] Configurar Gitea (app.ini) + [ ] Testar acesso local (porta 3002) + [ ] Verificar logs + +FASE 4 - WEB & SSL + [ ] Criar configuraΓ§Γ£o Nginx + [ ] Ativar site no Nginx + [ ] Obter certificado SSL (certbot) + [ ] Testar HTTPS + +FASE 5 - FINALIZAÇÃO + [ ] Criar usuΓ‘rio admin + [ ] Configurar SSH (porta 223) + [ ] Testar operaΓ§Γ΅es Git + [ ] Configurar backup + [ ] Documentar + +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ πŸ“‹ ARQUIVOS DE DOCUMENTAÇÃO CRIADOS ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + + βœ“ /root/MAPEAMENTO_PORTAS_SERVIDOR.md + β†’ Mapeamento completo e detalhado de todas as portas + + βœ“ /root/PORTAS_RESUMO.txt + β†’ Resumo visual em formato ASCII + + βœ“ /root/COMPARACAO_GITEA_PROJETOS.md + β†’ ComparaΓ§Γ£o entre meurepositorio.com e gitcubo.com + + βœ“ /root/RESUMO_EXECUTIVO_GITCUBO.txt + β†’ Este arquivo (resumo executivo) + +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ ⚠️ PONTOS DE ATENÇÃO ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + + β€’ Servidor jΓ‘ tem 5 projetos rodando + β€’ Recursos: Monitorar RAM, CPU e disco + β€’ Nginx: JΓ‘ gerencia mΓΊltiplos domΓ­nios + β€’ PostgreSQL: Considerar carga ao compartilhar + β€’ Backup: Configurar desde o inΓ­cio + β€’ Isolamento: Manter projetos completamente separados + +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ πŸ’‘ RECOMENDAÇÕES ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + + 1. Usar PostgreSQL compartilhado (porta 5432) + β†’ Menos recursos, mais eficiente + β†’ Criar database separado: gitcubo_db + + 2. Seguir mesma estrutura do meurepositorio.com + β†’ Facilita manutenΓ§Γ£o + β†’ Aproveita configuraΓ§Γ΅es testadas + + 3. Configurar backup automΓ‘tico desde o inΓ­cio + β†’ Scripts de backup diΓ‘rio + β†’ RetenΓ§Γ£o de 7 dias + + 4. Documentar todas as configuraΓ§Γ΅es + β†’ Facilita troubleshooting + β†’ Ajuda em futuras manutenΓ§Γ΅es + +╔═══════════════════════════════════════════════════════════════════════╗ +β•‘ βœ… MAPEAMENTO CONCLUÍDO - PRONTO PARA CRIAR ESTRUTURA β•‘ +β•‘ πŸ“… Data: 21 de Novembro de 2025 β•‘ +β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•