From 6f0965aa9c325bd2262c0f4f5e2fe0f0f710bff3 Mon Sep 17 00:00:00 2001 From: giles Date: Thu, 26 Feb 2026 12:13:03 +0000 Subject: [PATCH] Fix alembic path in entrypoints for both Docker and dev In Docker images, alembic.ini is at /app/alembic.ini (no service subdir). In dev, it's at /app/{service}/alembic.ini (bind-mounted). Now tries the service dir first, falls back to current dir. Co-Authored-By: Claude Opus 4.6 --- account/entrypoint.sh | 2 +- blog/entrypoint.sh | 2 +- cart/entrypoint.sh | 2 +- events/entrypoint.sh | 2 +- federation/entrypoint.sh | 2 +- market/entrypoint.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/account/entrypoint.sh b/account/entrypoint.sh index 861fddf..3fa6a27 100755 --- a/account/entrypoint.sh +++ b/account/entrypoint.sh @@ -36,7 +36,7 @@ conn.close() " || echo "DB creation failed (non-fatal), continuing..." echo "Running account Alembic migrations..." - (cd account && alembic upgrade head) + if [ -d account ]; then (cd account && alembic upgrade head); else alembic upgrade head; fi fi # Clear Redis page cache on deploy diff --git a/blog/entrypoint.sh b/blog/entrypoint.sh index d621cd7..45c03a0 100755 --- a/blog/entrypoint.sh +++ b/blog/entrypoint.sh @@ -36,7 +36,7 @@ conn.close() " || echo "DB creation failed (non-fatal), continuing..." echo "Running blog Alembic migrations..." - (cd blog && alembic upgrade head) + if [ -d blog ]; then (cd blog && alembic upgrade head); else alembic upgrade head; fi fi # Clear Redis page cache on deploy diff --git a/cart/entrypoint.sh b/cart/entrypoint.sh index 028cfe6..7957f13 100755 --- a/cart/entrypoint.sh +++ b/cart/entrypoint.sh @@ -36,7 +36,7 @@ conn.close() " || echo "DB creation failed (non-fatal), continuing..." echo "Running cart Alembic migrations..." - (cd cart && alembic upgrade head) + if [ -d cart ]; then (cd cart && alembic upgrade head); else alembic upgrade head; fi fi # Clear Redis page cache on deploy diff --git a/events/entrypoint.sh b/events/entrypoint.sh index fa7854e..2925443 100755 --- a/events/entrypoint.sh +++ b/events/entrypoint.sh @@ -36,7 +36,7 @@ conn.close() " || echo "DB creation failed (non-fatal), continuing..." echo "Running events Alembic migrations..." - (cd events && alembic upgrade head) + if [ -d events ]; then (cd events && alembic upgrade head); else alembic upgrade head; fi fi # Clear Redis page cache on deploy diff --git a/federation/entrypoint.sh b/federation/entrypoint.sh index 343b025..608f925 100755 --- a/federation/entrypoint.sh +++ b/federation/entrypoint.sh @@ -36,7 +36,7 @@ conn.close() " || echo "DB creation failed (non-fatal), continuing..." echo "Running federation Alembic migrations..." - (cd federation && alembic upgrade head) + if [ -d federation ]; then (cd federation && alembic upgrade head); else alembic upgrade head; fi fi # Clear Redis page cache on deploy diff --git a/market/entrypoint.sh b/market/entrypoint.sh index 024d179..49ee26b 100755 --- a/market/entrypoint.sh +++ b/market/entrypoint.sh @@ -36,7 +36,7 @@ conn.close() " || echo "DB creation failed (non-fatal), continuing..." echo "Running market Alembic migrations..." - (cd market && alembic upgrade head) + if [ -d market ]; then (cd market && alembic upgrade head); else alembic upgrade head; fi fi # Clear Redis page cache on deploy