hoàn thành bước tạo docker compose

This commit is contained in:
2026-03-31 14:47:29 +07:00
parent c362692c51
commit 5d5ec7fb1a
16 changed files with 427 additions and 3 deletions
+2 -3
View File
@@ -3,14 +3,13 @@ from contextlib import asynccontextmanager
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from .database import Base, engine
from .routers import annotations, auth, pdfs
@asynccontextmanager
async def lifespan(app: FastAPI):
# Create all tables on startup (use Alembic for migrations in production)
Base.metadata.create_all(bind=engine)
# Tables are managed by Alembic migrations.
# Run: alembic upgrade head (done by docker-compose entrypoint)
yield