Docker : supprime alembic upgrade head du startup
Le lifespan FastAPI appelle déjà init_db() (create_all) au démarrage. Lancer alembic en plus cassait sur une DB vide (migration initiale manquante). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,7 @@ EXPOSE 8002
|
|||||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||||
CMD curl -f http://localhost:8002/api/health || exit 1
|
CMD curl -f http://localhost:8002/api/health || exit 1
|
||||||
|
|
||||||
CMD ["sh", "-c", "alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port 8002"]
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8002"]
|
||||||
|
|
||||||
# ── Development ───────────────────────────────────────────────────────────────
|
# ── Development ───────────────────────────────────────────────────────────────
|
||||||
FROM base AS development
|
FROM base AS development
|
||||||
@@ -41,4 +41,4 @@ COPY backend/requirements.txt .
|
|||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
CMD ["sh", "-c", "alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port 8002 --reload"]
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8002", "--reload"]
|
||||||
|
|||||||
Reference in New Issue
Block a user