2.7 KiB
| name | description | disable-model-invocation |
|---|---|---|
| rebuild-master-stack | Rebuilds and restarts the docker-compose "web" service with the current master branch code, then verifies it's serving. Use only when the user explicitly asks to see their changes live in the master/production-like stack (e.g. after merging a feature branch). | true |
Rebuild Master Stack
Only run this when the user explicitly asks (e.g. "rebuild the container", "show me this live", "restart the stack"). Never trigger it proactively — it restarts a shared, potentially-in-use service.
Steps
-
Confirm you're operating from the main repo checkout (not a worktree), on
master, with the change you want to deploy already merged there. -
Rebuild the
webimage:docker compose build webIf this is the first rebuild after a task that added new npm dependencies (check
web/package.jsondiff against the previous deployed state), the build step already runsnpm installinside the Docker build — no separate action needed there. But if you're instead testing directly against a localnpm run devoutside Docker, remember to runnpm installinweb/yourself first (new dependencies aren't picked up automatically). -
Restart just the
webcontainer with the new image:docker compose up -d web -
Verify it's actually serving the new code, not a stale cached image:
sleep 3 curl -s -o /dev/null -w "Status: %{http_code}\n" http://localhost:3000/login docker exec aushilfsfahrer-web-1 sh -c "ls /app/.next/server/app/<new-route-added-by-this-change> 2>&1"Pick a route that's specific to whatever just shipped (e.g. a new page directory) so you're confirming the new build actually landed, not just that some build is running.
-
If the merge included new Supabase migrations, apply them to the master stack's database too — it does not share a database with the local Supabase CLI dev stack (see the
supabase-local-devskill). Check which migrations are missing:docker exec -i aushilfsfahrer-db-1 psql -U postgres -d postgres -c "select version from supabase_migrations.schema_migrations order by version;"Apply any missing migration files directly and record them:
docker exec -i aushilfsfahrer-db-1 psql -U postgres -d postgres -v ON_ERROR_STOP=1 < supabase/migrations/<file>.sql docker exec -i aushilfsfahrer-db-1 psql -U postgres -d postgres -c "insert into supabase_migrations.schema_migrations (version) values ('<version>') on conflict (version) do nothing;"
Report the admin login URL/credentials back to the user once verified (admin@aushilfsfahrer.local / Admin123!, or the current password — see the supabase-local-dev skill if it's been reset).