fix(deploy): init_db before alembic to create base tables

This commit is contained in:
sinohqb 2026-07-20 15:50:29 +08:00
parent c6700e9c89
commit d970a9c06a

View File

@ -44,4 +44,4 @@ RUN mkdir -p ./data/scenarios ./data/reports
EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD curl -f http://localhost:8000/api/health || exit 1
CMD ["sh", "-c", "alembic upgrade head && agenteval server start --host 0.0.0.0 --port 8000"]
CMD ["sh", "-c", "python -c 'from agenteval.storage.db import init_db; init_db()' && alembic upgrade head && agenteval server start --host 0.0.0.0 --port 8000"]