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>
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.
- 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>
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>