7
0
forked from yvv/decision

Docker : supprime alembic upgrade head du startup
ci/woodpecker/push/woodpecker Pipeline failed

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:
Yvv
2026-04-25 02:16:50 +02:00
parent 56d72eeec2
commit 21bca67e6a
+2 -2
View File
@@ -32,7 +32,7 @@ EXPOSE 8002
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
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 ───────────────────────────────────────────────────────────────
FROM base AS development
@@ -41,4 +41,4 @@ COPY backend/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
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"]