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