4 Commits

Author SHA1 Message Date
Hartmut 0ef9add935 ci(docker-deploy): pin DATABASE_URL to unique container name to fix split-brain
CI / Architecture Guardrails (push) Successful in 3m13s
CI / Typecheck (push) Successful in 3m39s
CI / Lint (push) Successful in 4m15s
CI / Unit Tests (push) Successful in 7m10s
CI / Build (push) Successful in 7m8s
CI / E2E Tests (push) Successful in 4m50s
CI / Fresh-Linux Docker Deploy (push) Successful in 5m1s
CI / Release Images (push) Successful in 5m10s
Nightly Security / Dependency Audit (push) Successful in 1m38s
CI / Assistant Split Regression (push) Successful in 5m18s
The app container is attached to both `default` and `gitea_gitea` networks.
Both have a container answering to "postgres" (ours on default, Gitea's
core on gitea_gitea). Docker's embedded DNS returns IPs from all attached
networks, so the app startup script's `prisma db push` and the seed
script's `prisma.user.count()` cached different IPs and hit different
postgres instances. The seed then saw "table public.users does not exist"
even though `/api/health` reported db:ok.

Override DATABASE_URL and REDIS_URL in docker-compose.ci.yml to use the
unique compose container names (capakraken-postgres-1, capakraken-redis-1)
so resolution is unambiguous.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 09:16:12 +02:00
Hartmut b164c4ca70 ci: fix e2e hostname collision and docker-deploy admin seed
CI / Architecture Guardrails (push) Has started running
CI / Typecheck (push) Has started running
CI / Lint (push) Has started running
CI / Assistant Split Regression (push) Has started running
CI / Unit Tests (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
CI / Fresh-Linux Docker Deploy (push) Has been cancelled
CI / Release Images (push) Has been cancelled
E2E: rename service hosts postgres/redis to e2epg/e2eredis — the
gitea_gitea network has multiple containers answering to 'postgres'
(Gitea core + concurrent job services), causing split-brain where
prisma db push and db:seed connected to different databases and
audit_logs ended up missing.

docker-compose.ci.yml: stop attaching postgres/redis to gitea_gitea
for the docker-deploy-test job — only the app needs cross-network
reachability; the compose services talk to each other on the
internal default network.

Docker Deploy: setup-admin.mjs imports @prisma/client and
@node-rs/argon2 which only live in packages/db/node_modules. Node
resolves bare specifiers from the script's directory (/app/scripts),
not cwd, so pnpm --filter wrappers did not help. Set NODE_PATH to
packages/db/node_modules as a fallback resolution root.
2026-04-13 00:04:32 +02:00
Hartmut 931d1f5d5f ci: bridge docker-deploy compose to gitea_gitea; bypass turbo for e2e
CI / Architecture Guardrails (push) Successful in 2m13s
CI / Assistant Split Regression (push) Successful in 3m42s
CI / Typecheck (push) Successful in 4m46s
CI / Lint (push) Successful in 5m43s
CI / Unit Tests (push) Successful in 8m1s
CI / Build (push) Successful in 6m6s
CI / E2E Tests (push) Failing after 4m12s
CI / Release Images (push) Has been skipped
CI / Fresh-Linux Docker Deploy (push) Failing after 3m26s
- docker-compose.ci.yml: attach app/postgres/redis to the external
  gitea_gitea network so the act_runner job container (which lives on
  gitea_gitea) can reach the compose services by name. Otherwise
  'localhost:3100' from the job container resolves to the job container
  itself, not the compose-network app — all health checks and smoke
  tests were hitting nothing.
- ci.yml: switch health/smoke URLs from localhost to http://app:3100
  and expose PLAYWRIGHT_BASE_URL so the smoke config can override.
- ci.yml: run E2E playwright directly via pnpm --filter, bypassing
  turbo which strict-filters PLAYWRIGHT_DATABASE_URL and friends.
- playwright.ci.config.ts: honour PLAYWRIGHT_BASE_URL env override.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 23:22:50 +02:00
Hartmut ec557a0b4b ci: fix E2E db target guard and strip bind mounts in docker deploy test
CI / Architecture Guardrails (push) Successful in 2m47s
CI / Typecheck (push) Successful in 3m11s
CI / Lint (push) Successful in 3m26s
CI / Unit Tests (push) Failing after 56s
CI / Assistant Split Regression (push) Successful in 4m57s
CI / Build (push) Successful in 4m37s
CI / Fresh-Linux Docker Deploy (push) Failing after 30s
CI / E2E Tests (push) Failing after 3m43s
CI / Release Images (push) Has been skipped
E2E was failing at `pnpm db:push` because scripts/prisma-with-env.mjs
refuses to run when DATABASE_URL's database name doesn't match the
expected target ("capakraken"). CI uses capakraken_test. Set
CAPAKRAKEN_EXPECTED_DB_NAME=capakraken_test on the e2e job.

Fresh-Linux Docker Deploy was failing because docker-compose.yml's dev
bind mount `.:/app` doesn't work under docker-outside-of-docker on the
Gitea act_runner — the host daemon can't see the job container's
/workspace/... path, so the mount masks the image's baked-in files and
the CMD fails with `cannot open ./tooling/docker/app-dev-start.sh`.
Added docker-compose.ci.yml that resets `app.volumes` and layered it
onto every `docker compose` invocation in the deploy job.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 21:41:46 +02:00