Reorganiza backend

This commit is contained in:
Oxy8
2026-03-02 17:33:45 -03:00
parent bba0ae887d
commit d4bfa5f064
8 changed files with 419 additions and 124 deletions

View File

@@ -20,12 +20,16 @@ services:
- SPARQL_TIMEOUT_S=${SPARQL_TIMEOUT_S:-300}
- SPARQL_READY_RETRIES=${SPARQL_READY_RETRIES:-30}
- SPARQL_READY_DELAY_S=${SPARQL_READY_DELAY_S:-4}
- SPARQL_READY_TIMEOUT_S=${SPARQL_READY_TIMEOUT_S:-10}
volumes:
- ./backend:/app
- ./data:/data:ro
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
depends_on:
- anzograph
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/api/health').read()"]
interval: 5s
timeout: 3s
retries: 60
frontend:
build: ./frontend
@@ -38,6 +42,8 @@ services:
- /app/node_modules
depends_on:
- backend
# Docker Compose v1 doesn't support depends_on:condition. Do an explicit wait here.
command: sh -c "until wget -qO- http://backend:8000/api/health >/dev/null 2>&1; do echo 'waiting for backend...'; sleep 1; done; npm run dev -- --host --port 5173"
anzograph:
image: cambridgesemantics/anzograph:latest