Document next steps after healthcheck and frontend testing
This commit is contained in:
parent
c2c5067c6c
commit
f5dda61c7a
|
|
@ -128,6 +128,50 @@ docker compose -f docker-compose.prod.yml logs api --tail=200
|
|||
- Login admin:
|
||||
- Use `SEED_ADMIN_EMAIL` e `SEED_ADMIN_PASSWORD` do `.env`.
|
||||
|
||||
### Próximo passo após `HTTP 200` no `/health`
|
||||
|
||||
Se você já recebeu `HTTP/1.1 200 OK` em `http://localhost:8080/health` **e** no IP público (`http://SEU_IP:8080/health`), o back-end está pronto para testes funcionais.
|
||||
|
||||
Checklist recomendado:
|
||||
|
||||
1. Confirmar documentação da API:
|
||||
|
||||
```bash
|
||||
curl -I http://SEU_IP:8080/swagger
|
||||
```
|
||||
|
||||
2. Testar autenticação (via Swagger/UI ou cliente HTTP) com o admin seed.
|
||||
3. Criar um registro real do seu fluxo principal (ex.: cliente/chamado/ordem) e validar leitura/listagem.
|
||||
4. Verificar logs enquanto testa:
|
||||
|
||||
```bash
|
||||
docker compose -f docker-compose.prod.yml logs -f api
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 5.1) Como testar o front-end agora (sem DNS)
|
||||
|
||||
Sem Wix/DNS, você ainda consegue testar o front-end por IP público. O essencial é apontar o front para a API externa:
|
||||
|
||||
- API base URL: `http://SEU_IP:8080`
|
||||
|
||||
Se o front for Vite/React (exemplo comum), configure algo como:
|
||||
|
||||
```env
|
||||
VITE_API_URL=http://SEU_IP:8080
|
||||
```
|
||||
|
||||
Depois gere e publique o front da forma que o repositório dele definir (build estático + servidor web/container).
|
||||
|
||||
Teste final esperado no navegador:
|
||||
|
||||
1. Abrir o front por IP (porta do front).
|
||||
2. Fazer login com o admin seed.
|
||||
3. Executar o fluxo principal da aplicação sem erro de CORS ou 401 inesperado.
|
||||
|
||||
> Se houver erro de CORS, ajuste `FRONTEND_PUBLIC_URL` no `.env` da API para a URL exata usada no navegador (incluindo porta), e recrie o container da API.
|
||||
|
||||
---
|
||||
|
||||
## 6) HTTPS (domínio público)
|
||||
|
|
|
|||
Loading…
Reference in New Issue