docs: add git workflow - GitHub as origin, Forgejo as mirror

This commit is contained in:
GoHorse Deploy 2026-02-15 14:22:58 +00:00
parent a3c2a18e61
commit f7c9ac5a0b

View file

@ -263,3 +263,54 @@ Detailed docs are in the `docs/` directory:
- The project supports 4 languages (PT, EN, ES, JA) via i18n message files in `frontend/src/i18n/`
- Environment variables must be configured in `.env` files for each service (backend, frontend, backoffice, seeder-api); these files are gitignored
- The `start.sh` script is the recommended way to run the development environment
## Git Workflow
### Remotes
| Remote | URL | Funcao |
|--------|-----|--------|
| **origin** | git@github.com:rede5/gohorsejobs.git | GitHub - desenvolvimento principal |
| **pipe** | https://pipe.gohorsejobs.com/bohessefm/gohorsejobs.git | Forgejo - mirror/CI |
| **forgejo** | git@pipe.gohorsejobs.com:bohessefm/gohorsejobs.git | Forgejo via SSH |
| **dokku** | dokku@localhost:gohorsejobs | Deploy Dokku (gohorsejobs) |
| **dokku-frontend** | dokku@localhost:gohorse-frontend | Deploy Dokku (frontend) |
### Fluxo de Desenvolvimento
O desenvolvimento acontece no **GitHub (origin)**. O Forgejo (pipe) eh um mirror que recebe o codigo via push manual.
```
GitHub (origin) ---> VPS vim ---> Forgejo (pipe)
[dev] git pull git push pipe dev
```
**Passo a passo para sincronizar:**
```bash
# 1. Na VPS, puxar as alteracoes do GitHub
cd /root/gohorsejobs
git pull origin dev
# 2. Enviar para o Forgejo
git push pipe dev
# 3. (Opcional) Enviar para outras branches
git pull origin main && git push pipe main
git pull origin hml && git push pipe hml
```
### Branches
| Branch | Ambiente | Descricao |
|--------|----------|-----------|
| **dev** | Desenvolvimento | Branch principal de trabalho |
| **hml** | Homologacao | Testes pre-producao |
| **main** | Producao | Versao estavel |
### Regras
1. **Todo desenvolvimento acontece no GitHub** (origin) - PRs, code review, CI
2. **Forgejo (pipe) eh mirror** - recebe push manual apos pull do GitHub
3. **Nunca commitar direto no Forgejo** - sempre via GitHub primeiro
4. **Deploy via Dokku** - push para remotes dokku/dokku-frontend para deploy na VPS