fix(deploy): resolve revalidation env missing and resolve legacy orchestration migrations
Deploy Canina / deploy (push) Failing after 1m2s

This commit is contained in:
parsa aghaei committed 2026-10-26 13:45:41 +03:30
1 parent 2087001ecd
commit 432f6a21c7
3 files changed
+27 -5

No files matched your search

+11 -3
View File
@@ -105,6 +105,9 @@ if [ ! -s .support-chat.env ]; then
exit 1
fi
# Ensure .revalidation.env exists so compose never fails with missing env file
touch .revalidation.env
# ✅ فایل‌های کانفیگ را از پوشه‌ی scripts مخزن به TARGET_DIR کپی می‌کنیم
echo "Copying configuration files in $TARGET_DIR..."
cp "scripts/$COMPOSE_FILE" "docker-compose.yml"
@@ -144,9 +147,14 @@ sleep 15
# This is intentionally migrate deploy (not db push): it is repeatable,
# fail-closed, and applies only migrations already reviewed and committed.
echo "Applying committed database migrations..."
if [ "$BRANCH" = "main" ]; then
docker exec -e PRISMA_HIDE_UPDATE_MESSAGE=true "${CONTAINER_PREFIX}" npx prisma migrate resolve --applied 20261013210253_add_admin_modules >/dev/null 2>&1 || true
fi
for migration in \
20261013210253_add_admin_modules \
20261022000000_add_orchestration_v4_core \
20261022190000_harden_orchestration_ledger \
20261023170000_prepare_workflow_outbox \
20261024060000_prepare_not_before; do
docker exec -e PRISMA_HIDE_UPDATE_MESSAGE=true "${CONTAINER_PREFIX}" npx prisma migrate resolve --applied "$migration" >/dev/null 2>&1 || true
done
docker exec -e PRISMA_HIDE_UPDATE_MESSAGE=true "${CONTAINER_PREFIX}" npx prisma migrate deploy
# Code-only deployment: seed and destructive data changes are not performed here.