perf(ranking): otimizar paginação usando Oracle direto

- Remover carregamento de 350k registros em memória no startup
- Refatorar endpoints para buscar dados direto do Oracle:
  - ranking_paginado
  - buscar_por_nome
  - ranking_estatisticas
  - obter_posicao_ranking
- Adicionar healthcheck leve no Oracle com start_period de 60s
- Corrigir start-ngrok.sh para subir todos os containers
- Adicionar domínio ngrok-free.dev no vite.config.js
This commit is contained in:
Frederico Castro
2025-12-21 22:22:58 -03:00
parent d4aa75ca0b
commit 7d73510101
5 changed files with 113 additions and 186 deletions

View File

@@ -33,8 +33,6 @@ services:
build:
context: ./frontend
dockerfile: Dockerfile
depends_on:
- backend
ports:
- "5173:5173"
environment:
@@ -52,26 +50,27 @@ services:
restart: unless-stopped
oracle18c:
container_name: oracle18c
image: gvenzl/oracle-xe:18-slim
environment:
- ORACLE_PASSWORD=local123
- ORACLE_CHARACTERSET=AL32UTF8
- APP_USER=local123
- APP_USER_PASSWORD=local123
- TZ=America/Sao_Paulo
ports:
- "1521:1521"
- "5500:5500"
volumes:
- oracle_data:/opt/oracle/oradata
healthcheck:
test: ["CMD", "bash", "-c", "echo 'SELECT 1 FROM DUAL;' | sqlplus -s SYSTEM/\"$${ORACLE_PASSWORD}\"@localhost:1521/XEPDB1"]
interval: 30s
timeout: 10s
retries: 20
networks:
- shared_network
container_name: oracle18c
image: gvenzl/oracle-xe:18-slim
environment:
- ORACLE_PASSWORD=local123
- ORACLE_CHARACTERSET=AL32UTF8
- APP_USER=local123
- APP_USER_PASSWORD=local123
- TZ=America/Sao_Paulo
ports:
- "1521:1521"
- "5500:5500"
volumes:
- oracle_data:/opt/oracle/oradata
healthcheck:
test: ["CMD", "bash", "-c", "echo 'SELECT 1 FROM DUAL;' | sqlplus -s SYSTEM/local123@localhost:1521/XEPDB1 | grep -q 1"]
interval: 10s
timeout: 5s
retries: 30
start_period: 60s
networks:
- shared_network
networks:
shared_network: