fix(compose): force api build to avoid stale published image#49
fix(compose): force api build to avoid stale published image#49colinwilliams91 wants to merge 1 commit into
Conversation
…inc#48) Set pull_policy: build on the api service so docker compose up always builds from apps/api/Dockerfile instead of pulling the stale 2024-09-06 trieve/firecrawl:latest image (corepack signature failure). Reconcile README and SELF_HOST.md with the build-from-source path.
|
Follow-up: the failing cron workflows flagged in this PR's "Out of scope" section now have their own PR -- see #52 (tracking issue #50, plus a separate follow-up issue #51 for the stale SELF_HOST.md:86 "Bull Queue Manager UI" reference). The fix moves both crons into |
What & why
Fixes #48.
docker compose up -don a fresh clone pulled the stale publishedtrieve/firecrawl:latestimage (built 2024-09-06) for theapiservice, which crashed on startup withCannot find matching keyidbecause the bundledcorepackpredates npm's registry signing-key rotation. Theworkerservice — which has noimage:key — always built locally, so the two services ended up running different images, andapinever came up.docker compose build && docker compose up -dworked because that path forces a local build.Root cause:
docker-compose.yamldeclared bothimage: trieve/firecrawland (via thex-common-serviceanchor)build: apps/apion theapiservice. With Compose's defaultpull_policy,docker compose uppulls the named image instead of building it.Changes
docker-compose.yaml— addpull_policy: buildto theapiservice. This keeps theimage:key (which is still useful as the tag a future publish workflow would produce) but forces Compose to always build fromapps/api/Dockerfileand never pull the registry artifact. The fix mirrors what theworkerservice already does implicitly (it has noimage:key, so it only ever builds locally). Scope is intentionally limited toapi;puppeteer-servicehas the sameimage:+build:pattern but is left untouched per the scoped fix — flagging it here as a known follow-up.README.md— the self-host snippet recommended pulling the pinned published images (trieve/firecrawl:v0.0.46,trieve/puppeteer-service-ts:v0.0.6), which are also stale and fail with the same corepack error. Added a prominent warning above the snippet explaining the images are stale, that there is no release-triggered publish workflow in this repo, and that the supported path today is to clone and rundocker compose up -dfrom the repo root (which now usespull_policy: build).SELF_HOST.md— updated step 4 to reflect thatdocker compose up -dis now sufficient (no separatebuildstep needed) because theapiservice setspull_policy: build, and linked to issue [Bug] docker compose up pulls a 2024 published image that crashes on startup (corepack signature failure) #48.Verification
docker compose configparses cleanly and renderspull_policy: buildon theapiservice:(Any
variable is not setwarnings are just because no.envfile exists in this scratch checkout; they are pre-existing and unrelated.)Out of scope, but worth flagging
puppeteer-service(docker-compose.yaml:24) has the sameimage:+build:trap. Left alone here per the scoped fix; happy to follow up.apps/puppeteer-service-ts/Dockerfileis malformed — two concatenatedFROM node:18-slimstages (lines 1-21 and 22-70), so only the second stage takes effect. Probably worth a follow-up issue..github/workflows/check-queues.yml(every 5 min) and.github/workflows/clean-before-24h-complete-jobs.yml(every 30 min) have been failing continuously — at least the last 24h, every single run. They curlhttps://api.firecrawl.dev/admin/${BULL_AUTH_KEY}/..., which suggestsBULL_AUTH_KEYis not configured in thedevflowinc/firecrawl-simplerepo (or the endpoint has moved). This is unrelated to [Bug] docker compose up pulls a 2024 published image that crashes on startup (corepack signature failure) #48 but produces constant CI noise; the maintainers may want to either set the secret / update the endpoint, or archive these workflows (matching the existing.github/archive/pattern used for the SDK workflows)..github/workflows/build-docker-images.ymlonly runs on PRs withpush: falseandpr-<number>tags — there is no release-triggered job to publishtrieve/firecrawlto Docker Hub, which is why:latestand the pinned tags drifted in the first place. Thepull_policy: buildfix sidesteps this for self-hosters, but a publish workflow would be a cleaner long-term answer.Closes #48.