fix(docker): include migrations directory in backend image

The migrations/ directory was missing from the Dockerfile COPY instructions,
causing ModuleNotFoundError when app.main tries to import and run migrations
during startup. This caused production deployments to fail with:
  ModuleNotFoundError: No module named 'migrations'

The automatic migration runner in main.py (line 157) needs this directory to:
1. Detect database schema changes
2. Run pending migrations
3. Initialize default admin user

Fixes production deployment failure when containers start.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-06-13 18:52:06 +05:00
parent 2e8558fa51
commit 5d3f3c2b3b

View File

@@ -50,6 +50,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
COPY --from=builder /root/.local /root/.local
COPY app ./app
COPY migrations ./migrations
COPY alembic ./alembic
COPY alembic.ini .
COPY init_admin.py .