ci: build backend with system chromium for the arm64 crawler
All checks were successful
deploy / test-backend (push) Successful in 19m59s
deploy / test-frontend (push) Successful in 9m52s
deploy / build-and-push (push) Successful in 2m34s
deploy / deploy (push) Successful in 12s

chromiumoxide's fetcher has no linux/arm64 build, so on the Pi the crawler's
browser launch failed with 'OS linux aarch64 is not supported'. Build the
backend image with INSTALL_CHROMIUM=true (Debian chromium-headless-shell,
verified present + runnable on trixie/arm64 at /usr/bin/chromium-headless-shell)
and set CRAWLER_CHROMIUM_BINARY to it in .env so the launcher uses the system
binary instead of the fetcher. Backend image only; frontend unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-14 20:17:47 +02:00
parent 39fcfc813a
commit 4262efeff7

View File

@@ -113,7 +113,13 @@ jobs:
echo "$REGISTRY_PASSWORD" | docker login "$REGISTRY_URL" -u "$REGISTRY_USERNAME" --password-stdin
for svc in backend frontend; do
img="$REGISTRY_URL/mangalord-$svc"
docker build -t "$img:$IMAGE_TAG" -t "$img:latest" -t "$img:$VERSION" "./$svc"
# The backend bundles Debian's headless chromium for the crawler:
# chromiumoxide's fetcher has no arm64 build, so the Pi must use a
# system binary (pair with the runtime env
# CRAWLER_CHROMIUM_BINARY=/usr/bin/chromium-headless-shell).
build_args=""
if [ "$svc" = "backend" ]; then build_args="--build-arg INSTALL_CHROMIUM=true"; fi
docker build $build_args -t "$img:$IMAGE_TAG" -t "$img:latest" -t "$img:$VERSION" "./$svc"
for tag in "$IMAGE_TAG" latest "$VERSION"; do docker push "$img:$tag"; done
done
docker logout "$REGISTRY_URL"