3.6 KiB
| name | description |
|---|---|
| rebuild-master-stack | Rebuilds and restarts the docker-compose "web" service with the current master branch code, then verifies it's serving. Run after merging a feature branch into master, or whenever the user asks to see their changes live in the master/production-like stack. |
Rebuild Master Stack
The user granted standing permission (2026-08-19) to run this proactively after merging a feature branch into master, without asking each time first — it's expected as the normal follow-up to a merge. Still restarts a shared, potentially-in-use service, so use judgment: skip it (or check first) if you have reason to think someone is actively using the master stack right now.
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:3001/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;"Enthielten die neuen Migrationen einen
pg_cron-Job, der die App aufruft (z.B.notification-dispatch), zusätzlich die beiden DB-Settings setzen, die die Migration bewusst nicht enthält:docker exec -i aushilfsfahrer-db-1 psql -U postgres -d postgres -c \ "alter database postgres set app.notification_dispatch_url = 'http://web:3000/api/notifications/dispatch';" docker exec -i aushilfsfahrer-db-1 psql -U postgres -d postgres -c \ "alter database postgres set app.notification_dispatch_secret = '<Wert von NOTIFICATION_DISPATCH_SECRET aus der Root-.env>';"Danach greifen neue Verbindungen die Settings auf; der Cron-Job ruft ab der nächsten Minute
POST /api/notifications/dispatchauf.
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).