1
This commit is contained in:
parent
c4ab74ed0a
commit
8c345805dd
@ -1,6 +1,7 @@
|
|||||||
FROM python:3.13-slim
|
FROM python:3.13-slim
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
ENV PYTHONPATH=/app
|
||||||
|
|
||||||
# Install dependencies first (layer caching)
|
# Install dependencies first (layer caching)
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
|
|||||||
@ -1,10 +1,16 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
from logging.config import fileConfig
|
from logging.config import fileConfig
|
||||||
|
|
||||||
from alembic import context
|
from alembic import context
|
||||||
from sqlalchemy import pool
|
from sqlalchemy import pool
|
||||||
from sqlalchemy.ext.asyncio import async_engine_from_config
|
from sqlalchemy.ext.asyncio import async_engine_from_config
|
||||||
|
|
||||||
|
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||||
|
if str(BASE_DIR) not in sys.path:
|
||||||
|
sys.path.insert(0, str(BASE_DIR))
|
||||||
|
|
||||||
from app.config import settings
|
from app.config import settings
|
||||||
from app.db.base import Base
|
from app.db.base import Base
|
||||||
from app.db import models as _models # noqa: F401 ensure all models registered
|
from app.db import models as _models # noqa: F401 ensure all models registered
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user