2 Commits

Author SHA1 Message Date
fd592f8b59 fix(api): add missing ssh_keys router import
Some checks failed
Backend Tests / pytest (Python 3.12) (push) Failing after 46s
The ssh_keys module was imported in main.py but missing from api/__init__.py,
potentially causing import issues. Added to ensure all API routers are
explicitly declared and available.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-13 18:53:13 +05:00
5d3f3c2b3b 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>
2026-06-13 18:52:06 +05:00
2 changed files with 4 additions and 1 deletions

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 .

View File

@@ -9,10 +9,11 @@ from . import settings
from . import notifications
from . import users
from . import workspaces
from . import ssh_keys
__all__ = [
"auth",
"dashboard",
"dashboard",
"proxmox",
"templates",
"ipam",
@@ -21,4 +22,5 @@ __all__ = [
"notifications",
"users",
"workspaces",
"ssh_keys",
]