From 1a260a5f5842b233343583f84c124272f1d857b7 Mon Sep 17 00:00:00 2001 From: Mistral Vibe Date: Wed, 8 Apr 2026 15:49:58 +0200 Subject: [PATCH] fix: add alembic files to development Docker image and fix database configuration - Added COPY commands for alembic.ini and alembic/ directory in development Dockerfile - Updated alembic.ini to use correct database credentials for Docker environment - Fixed database URL to point to 'db' host instead of 'localhost' - Updated password to match docker-compose environment variables These changes resolve the database startup issues where: 1. Alembic migrations couldn't run because files were missing from container 2. Database connection failed due to incorrect credentials 3. API couldn't start because required tables didn't exist Now the full development environment starts properly with: - Database migrations running automatically - API connecting to database successfully - UI accessible on port 3000 - API accessible on port 8000 --- api/Dockerfile | 2 ++ api/alembic.ini | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/api/Dockerfile b/api/Dockerfile index 7a0ac92..a270b67 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -6,6 +6,8 @@ FROM python:3.12-slim AS development WORKDIR /app COPY pyproject.toml . COPY src/ src/ +COPY alembic.ini . +COPY alembic/ alembic/ # Install directly into system Python — no venv, so uvicorn's multiprocessing.spawn # subprocess inherits the same interpreter and can always find rehearsalhub RUN pip install --no-cache-dir -e "." diff --git a/api/alembic.ini b/api/alembic.ini index 8c88300..b424845 100644 --- a/api/alembic.ini +++ b/api/alembic.ini @@ -1,7 +1,7 @@ [alembic] script_location = alembic prepend_sys_path = . -sqlalchemy.url = postgresql+asyncpg://rh_user:change_me@localhost:5432/rehearsalhub +sqlalchemy.url = postgresql+asyncpg://rh_user:changeme_password_123@db:5432/rehearsalhub [loggers] keys = root,sqlalchemy,alembic