-
-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
Description
Problem
docker-compose.yml includes PostgreSQL with init-databases.sql that creates empty databases (autobot_slm, slm_users), but Alembic migrations never run. On first boot, SLM health checks pass (daemon is up) but API calls fail with 500 errors because tables don't exist.
Impact
High — SLM backend is non-functional after docker compose up until manual alembic upgrade head is run inside the container.
Expected Fix
Add migration step via entrypoint script or init container:
Option A — Entrypoint wrapper for SLM:
#!/bin/bash
# wait-for-db-and-migrate.sh
python -c "import asyncio; from database.db_service import DatabaseService; asyncio.run(DatabaseService().initialize())"
alembic upgrade head
exec "$@"Option B — Init container:
autobot-slm-migrate:
build: { context: ., dockerfile: docker/slm/Dockerfile }
command: alembic upgrade head
depends_on:
autobot-postgres: { condition: service_healthy }Discovered During
Working on #1809 Docker containerization.
Reactions are currently unavailable