fix(auth): resolve login redirect loop in Docker #11

Merged
marcel merged 5 commits from fix/login-redirect into main 2026-03-19 15:13:20 +01:00

5 Commits

Author SHA1 Message Date
Marcel
706c029a5e fix(ci): pin DOCKER_API_VERSION=1.43 for e2e job
Some checks failed
CI / Unit & Component Tests (push) Successful in 9m49s
CI / Backend Unit Tests (push) Successful in 2m15s
CI / E2E Tests (push) Failing after 13m6s
CI / Unit & Component Tests (pull_request) Successful in 11m14s
CI / Backend Unit Tests (pull_request) Successful in 2m18s
CI / E2E Tests (pull_request) Failing after 13m20s
The runner's Docker client negotiates API 1.53 but the daemon on the
NAS only supports up to 1.43. Pin the version for all docker commands
in the e2e job, including the new network connect step.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 14:32:27 +01:00
Marcel
c023d5b0a2 fix(ci): connect job container to compose network for DB/MinIO access
Some checks failed
CI / Unit & Component Tests (push) Successful in 9m36s
CI / Backend Unit Tests (push) Successful in 1m54s
CI / E2E Tests (push) Failing after 1m39s
CI / Unit & Component Tests (pull_request) Successful in 9m16s
CI / Backend Unit Tests (pull_request) Successful in 1m59s
CI / E2E Tests (pull_request) Failing after 2m8s
The act_runner job runs inside a Docker container. Docker Compose port
mappings bind to the Docker host, not the job container's localhost —
so localhost:5433 was always refused.

Fix: after compose starts, connect the job container (identified by
/etc/hostname) to the archive-net compose network. Then switch the
backend startup args to use service names db:5432 and minio:9000
instead of host-mapped ports.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 14:00:51 +01:00
Marcel
a87f40d0ea fix(ci): pass docker-compose.ci.yml override to e2e compose commands
Some checks failed
CI / Unit & Component Tests (push) Has been cancelled
CI / Backend Unit Tests (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
CI / Unit & Component Tests (pull_request) Successful in 9m19s
CI / Backend Unit Tests (pull_request) Successful in 1m54s
CI / E2E Tests (pull_request) Failing after 4m14s
The e2e job was calling plain `docker compose up` without the CI
override file, so it used the base compose bind-mount for MinIO
(./data/minio) which doesn't exist on the runner. The CI override
replaces bind mounts with ephemeral named volumes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 13:06:38 +01:00
Marcel
5044f99aac fix(api): use API_INTERNAL_URL in tags and persons proxy routes
Some checks failed
CI / Unit & Component Tests (push) Has been cancelled
CI / Backend Unit Tests (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
CI / Unit & Component Tests (pull_request) Has been cancelled
CI / Backend Unit Tests (pull_request) Has been cancelled
CI / E2E Tests (pull_request) Has been cancelled
Both SvelteKit API proxy routes were hardcoding http://localhost:8080,
breaking typeahead search in Docker environments.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 12:58:21 +01:00
Marcel
a52b8a0694 fix(auth): use API_INTERNAL_URL in userGroup hook
Some checks failed
CI / Backend Unit Tests (push) Has been cancelled
CI / Unit & Component Tests (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
CI / Unit & Component Tests (pull_request) Has been cancelled
CI / Backend Unit Tests (pull_request) Has been cancelled
CI / E2E Tests (pull_request) Has been cancelled
The userGroup hook was hardcoding http://localhost:8080 instead of
reading API_INTERNAL_URL from the environment. In Docker this caused
the /api/users/me fetch to fail silently, leaving event.locals.user
unset and triggering the handleAuth guard to redirect every page to
/login — including the login form action itself, creating an infinite
redirect loop.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 12:56:59 +01:00