From 7971026d2244397f6e19b158c3700f0db40e3502 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 6 Apr 2026 04:01:03 +0000 Subject: [PATCH] Move drizzle-kit to devDependencies; use docker compose wait in deploy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit drizzle-kit is a dev-only tool (schema generation and local migrations). Now that production migrations run via the programmatic drizzle-orm API in the migrate init container, drizzle-kit has no runtime role. Also replaces the polling health check loop with docker compose wait, which blocks until the migrate service exits and returns its exit code cleanly — no sleep or manual status inspection needed. https://claude.ai/code/session_01ReaqH3o9NVH4QU4qE9WMMQ --- .github/workflows/deploy.yml | 25 ++++--------------------- package.json | 2 +- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b1cf70a..5e86976 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -149,27 +149,10 @@ jobs: docker login $CONTAINER_REGISTRY -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD cd brackt docker compose pull - docker compose up -d --remove-orphans - - echo "Waiting for app to start..." - for i in $(seq 1 12); do - STATUS=$(docker inspect --format='{{.State.Status}}' brackt 2>/dev/null || echo "missing") - if [ "$STATUS" = "running" ]; then - echo "App is running" - break - fi - if [ $i -eq 12 ]; then - echo "App failed to start. Logs:" - docker logs brackt-migrate --tail=30 2>/dev/null || true - docker logs brackt --tail=30 2>/dev/null || true - exit 1 - fi - sleep 5 - done - - MIGRATE_EXIT=$(docker inspect --format='{{.State.ExitCode}}' brackt-migrate 2>/dev/null || echo "1") - if [ "$MIGRATE_EXIT" != "0" ]; then + docker compose up -d migrate + if ! docker compose wait migrate | grep -qx "0"; then echo "Migration failed:" - docker logs brackt-migrate + docker compose logs migrate exit 1 fi + docker compose up -d --remove-orphans diff --git a/package.json b/package.json index 92e0d74..118e9f6 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,6 @@ "clsx": "^2.1.1", "compression": "^1.8.0", "date-fns": "^4.1.0", - "drizzle-kit": "~0.28.1", "drizzle-orm": "~0.36.3", "express": "^5.1.0", "isbot": "^5.1.27", @@ -103,6 +102,7 @@ "@vitest/ui": "^3.2.4", "cypress": "^14.5.4", "dotenv-cli": "^8.0.0", + "drizzle-kit": "~0.28.1", "esbuild": "^0.25.11", "jsdom": "^27.0.1", "oxlint": "^1.56.0",