Skip to content
This repository was archived by the owner on May 19, 2026. It is now read-only.

Commit 259251e

Browse files
fix(docker): install Alembic and run migrations via python -m (#12)
The backend image pip-installed requirements.txt but Alembic was never declared, so entrypoint.sh failed with alembic: not found (exit 127). Add alembic and psycopg so POSTGRES_URL migrations match alembic/env.py. Invoke migrations with python -m alembic for consistent module resolution. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Jakub Doboš <kubo6472@users.noreply.github.com>
1 parent 408327c commit 259251e

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

backend/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
22
set -e
33
cd /app
4-
alembic upgrade head
4+
python -m alembic upgrade head
55
exec uvicorn main:app --host 0.0.0.0 --port 8000

backend/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
fastapi>=0.115.0
22
uvicorn[standard]>=0.32.0
3+
alembic>=1.13.0
4+
psycopg[binary]>=3.2.0
35
sqlmodel>=0.0.22
46
aiosqlite>=0.20.0
57
fastapi-users>=14.0.0

0 commit comments

Comments
 (0)