managarten/scripts
Till JS 83eaf71e9f
Some checks are pending
CD Mac Mini / Detect Changes (push) Waiting to run
CD Mac Mini / Deploy (push) Blocked by required conditions
CI / Detect Changes (push) Waiting to run
CI / Validate (push) Waiting to run
CI / Auth flow integration test (push) Waiting to run
CI / Build mana-auth (push) Blocked by required conditions
CI / Build mana-search (push) Blocked by required conditions
CI / Build mana-sync (push) Blocked by required conditions
CI / Build mana-notify (push) Blocked by required conditions
CI / Build mana-api-gateway (push) Blocked by required conditions
CI / Build mana-crawler (push) Blocked by required conditions
CI / Build mana-media (push) Blocked by required conditions
CI / Build mana-credits (push) Blocked by required conditions
CI / Build mana-web (push) Blocked by required conditions
CI / Build chat-backend (push) Blocked by required conditions
CI / Build chat-web (push) Blocked by required conditions
CI / Build todo-backend (push) Blocked by required conditions
CI / Build todo-web (push) Blocked by required conditions
CI / Build calendar-backend (push) Blocked by required conditions
CI / Build calendar-web (push) Blocked by required conditions
CI / Build clock-web (push) Blocked by required conditions
CI / Build contacts-backend (push) Blocked by required conditions
CI / Build contacts-web (push) Blocked by required conditions
CI / Build presi-web (push) Blocked by required conditions
CI / Build storage-backend (push) Blocked by required conditions
CI / Build storage-web (push) Blocked by required conditions
CI / Build telegram-stats-bot (push) Blocked by required conditions
CI / Build nutriphi-backend (push) Blocked by required conditions
CI / Build nutriphi-web (push) Blocked by required conditions
CI / Build skilltree-web (push) Blocked by required conditions
Docker Validate / Validate Dockerfiles (push) Waiting to run
Docker Validate / Build calendar-web (push) Blocked by required conditions
Docker Validate / Build todo-backend (push) Blocked by required conditions
Docker Validate / Build todo-web (push) Blocked by required conditions
Docker Validate / Build zitare-web (push) Blocked by required conditions
Docker Validate / Build mana-auth (push) Blocked by required conditions
Docker Validate / Build mana-sync (push) Blocked by required conditions
Docker Validate / Build mana-media (push) Blocked by required conditions
Mirror to Forgejo / Push to Forgejo (push) Waiting to run
fix(macmini): clean up container conflicts in build-app.sh restart cycle
Hit "container name already in use" / "removal in progress" errors
three times during today's Phase 5 deploys. The previous restart
pattern was just `compose up -d --no-deps`, which fails when:

  1. A previous interrupted recreate left a stale container under
     the canonical name. The new `up` tries to claim the name and
     gets a conflict.
  2. Compose's recovery from #1 sometimes creates a hash-prefixed
     orphan container (`<hash>_<container_name>`), which then
     blocks the next clean run too.
  3. Even `--force-recreate` can't always handle the case because
     the old container is in the middle of being removed when the
     new one is being created (race).

Two-step replacement that's reliable across all three failure modes:

  Step 1 — `docker compose rm -fs SERVICES`
    Stops + force-removes the canonical compose-managed container.
    Idempotent: does nothing if already gone. Filters out the
    "No stopped containers" log noise so the output stays clean.

  Step 2 — orphan sweep via `docker rm -f`
    For each service, look up its container_name from the
    compose config (falls back to the service name if not set),
    then `docker ps -aq --filter name=^${cname}$` for the canonical
    one and `name=_${cname}$` for hash-prefixed orphans. Anything
    found gets nuked. This catches the case where compose's own
    state has lost track of an orphan it created earlier.

  Step 3 — `docker compose up -d --no-deps --remove-orphans`
    Creates the fresh container. The `--remove-orphans` flag also
    silences the "Found orphan containers ([mana-game-whopixels])"
    warning we kept seeing — that's a leftover from a removed
    service that nobody had cleaned up.

The container_name extraction uses awk on `compose config` output
(verified locally: `mana-web` → `mana-app-web`) so the script doesn't
need a hard-coded service→container mapping.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 20:22:52 +02:00
..
dev chore(dev): add setup-dev-user script for local founder accounts 2026-04-09 12:23:15 +02:00
mac-mini fix(macmini): clean up container conflicts in build-app.sh restart cycle 2026-04-09 20:22:52 +02:00
test-data feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
test-reporting chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
audit-workspace-deps.mjs fix(mana-auth) + chore: rewrite /api/v1/auth/login JWT mint, remove Matrix stack 2026-04-08 16:32:13 +02:00
backup-monitoring.sh feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
check-status.sh feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
create-gift-codes.mjs feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
deploy-metrics.sh fix(deploy): fix image size measurement in deploy metrics 2026-03-20 21:13:03 +01:00
ecosystem-audit.mjs feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
fix-mixed-imports.mjs Fix wrong type 2025-12-04 23:25:25 +01:00
generate-dockerfiles.mjs feat(infra): extend Dockerfile validator to backends and services 2026-03-25 08:57:10 +01:00
generate-env.mjs feat(env): persistent dev secrets via .env.secrets override 2026-04-08 17:50:37 +02:00
generate-status-page.sh refactor(mana): rename inventar → inventory across the codebase 2026-04-09 15:50:24 +02:00
lighthouse-audit.sh feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
run-integration-tests.sh fix(mana-auth): account lockout was structurally dead + add failure-path tests 2026-04-08 18:29:00 +02:00
run-tests-with-coverage.sh feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
setup-databases.sh feat(news): backend ingester service + curated feed API 2026-04-09 15:53:26 +02:00
setup-secrets.mjs feat(env): persistent dev secrets via .env.secrets override 2026-04-08 17:50:37 +02:00
test-chat-auth.sh chore: tidy root files + reorganize a few stale docs 2026-04-08 12:15:27 +02:00
validate-cloudflared-config.mjs chore(infra): pre-commit validator for cloudflared-config.yml 2026-04-09 18:02:51 +02:00
validate-dockerfiles.mjs feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
validate-monorepo.mjs feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00