Étape 1 : squelette du projet
- Monorepo backend/ + frontend/ + deploy/ - Backend FastAPI/SQLModel/Alembic/uv qui démarre (health check, config, i18n, base de test PostgreSQL, pytest) - docker-compose de développement (db + backend hot-reload) - Chaîne CI/CD GitHub Actions : lint + tests, build image, push GHCR, déploiement SSH sur le VPS à chaque push main - CLAUDE.md : vocabulaire du domaine, conventions, commandes Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017uUsRg7XzopkCPWimwg9ZM
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
from fastapi import APIRouter
|
||||
from sqlalchemy import text
|
||||
|
||||
from app.db import engine
|
||||
from app.i18n import t
|
||||
|
||||
router = APIRouter(tags=["health"])
|
||||
|
||||
|
||||
@router.get("/health")
|
||||
def health() -> dict[str, str]:
|
||||
return {"status": "ok", "message": t("health.ok")}
|
||||
|
||||
|
||||
@router.get("/health/db")
|
||||
def health_db() -> dict[str, str]:
|
||||
with engine.connect() as conn:
|
||||
conn.execute(text("SELECT 1"))
|
||||
return {"status": "ok"}
|
||||
Reference in New Issue
Block a user