Railway Deployment #98cab2 fix: copy bun.lock in links.Dockerfile#353
Railway Deployment #98cab2 fix: copy bun.lock in links.Dockerfile#353railway-app[bot] wants to merge 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
Greptile SummaryThis PR fixes a broken Docker build for the Link Tracking service by copying
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Host as Build Context (Host)
participant Docker as Docker Build (links.Dockerfile)
participant Bun as bun install
Host->>Docker: COPY package.json
Host->>Docker: COPY bun.lock (NEW)
Host->>Docker: COPY apps/links/package.json
Host->>Docker: COPY packages/*/package.json
Host->>Docker: COPY packages/
Docker->>Bun: bun install --ignore-scripts
Note over Bun: Uses pinned versions from bun.lock<br/>(previously: re-resolved versions, failing on @ai-sdk/provider-utils@4.0.21)
Bun-->>Docker: ✅ Dependencies installed
Docker->>Docker: bun build --compile → /app/server
Docker->>Docker: COPY --from=build /app/server (distroless stage)
Last reviewed commit: "fix: copy bun.lock i..." |
| WORKDIR /app | ||
|
|
||
| COPY package.json package.json | ||
| COPY bun.lock bun.lock |
There was a problem hiding this comment.
Same fix missing in
basket.Dockerfile and uptime.Dockerfile
basket.Dockerfile and uptime.Dockerfile have the exact same structure — they copy package.json files, then run bun install --ignore-scripts — but neither copies bun.lock before the install step. This means both services are vulnerable to the same dependency resolution failure that triggered this PR.
basket.Dockerfile(line 11):RUN bun install --ignore-scriptswith nobun.lockcopieduptime.Dockerfile(line 11):RUN bun install --ignore-scriptswith nobun.lockcopied
Both should get the same COPY bun.lock bun.lock line added before their respective bun install calls to ensure pinned dependency versions are used.
Problem
The Link Tracking service build fails during
bun install --ignore-scriptsbecause the lockfile is never copied into the Docker build context. Without it, bun resolves all dependency versions from scratch and attempts to install@ai-sdk/provider-utils@4.0.21, a version that does not exist in the registry.Solution
Added
COPY bun.lock bun.locktolinks.Dockerfilebefore thebun installstep. With the lockfile present, bun uses pinned versions for all dependencies instead of re-resolving them, avoiding the missing version error.Changes
links.DockerfileContext
e3f50faGenerated by Railway